
/* =========================================
   DANIEL MILLS WEB DEVELOPMENT
   PROFESSIONAL CYBER / TECH THEME
   ========================================= */

/* DESIGN VARIABLES */

:root {
    --color-navy: #0b1426;
    --color-navy-dark: #050b17;
    --color-surface: #101e34;
    --color-surface-light: #172942;

    --color-blue: #3b82f6;
    --color-blue-dark: #2563eb;
    --color-cyan: #38bdf8;
    --color-blue-light: #93c5fd;

    --color-text: #d6e2f1;
    --color-text-light: #9bacc3;
    --color-white: #ffffff;
    --color-background: #081222;
    --color-border: rgba(148, 180, 220, 0.16);

    --shadow-small: 0 6px 20px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.25);

    --border-radius: 14px;
    --max-width: 1120px;
    --transition: 200ms ease;
}

/* =========================================
   RESET AND GLOBAL STYLES
   ========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--color-white);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 900px;
    margin-bottom: 24px;
    font-size: clamp(2.7rem, 7vw, 5rem);
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.035em;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

p {
    margin-top: 0;
}

section {
    padding: 100px max(
        24px,
        calc((100% - var(--max-width)) / 2)
    );
}

section > h2,
section > h2 + p {
    text-align: center;
}

section > h2 + p {
    max-width: 660px;
    margin: 0 auto 52px;
    color: var(--color-text-light);
    font-size: 1.08rem;
}

/* =========================================
   NAVIGATION
   ========================================= */

header {
    position: sticky;
    z-index: 1000;
    top: 0;

    border-bottom: 1px solid var(--color-border);
    background: rgba(5, 11, 23, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

nav {
    display: flex;
    width: min(
        calc(100% - 48px),
        var(--max-width)
    );
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    gap: 30px;
}

.logo {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
}

.logo span {
    display: block;
    margin-top: 5px;

    color: var(--color-cyan);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 30px;
    list-style: none;
}

nav ul a {
    position: relative;
    color: var(--color-text-light);
    font-size: 0.94rem;
    font-weight: 650;
    text-decoration: none;
    transition: color var(--transition);
}

nav ul a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;

    background: var(--color-cyan);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

nav ul a:hover,
nav ul a:focus-visible {
    color: var(--color-white);
}

nav ul a:hover::after,
nav ul a:focus-visible::after {
    transform: scaleX(1);
}

/* =========================================
   HERO SECTION
   ========================================= */

#home {
    position: relative;
    isolation: isolate;

    display: flex;
    min-height: 720px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    padding: 120px 24px;
    text-align: center;

    background-color: var(--color-navy-dark);

    background-image:
        linear-gradient(
            180deg,
            rgba(3, 9, 22, 0.80) 0%,
            rgba(5, 13, 30, 0.68) 55%,
            rgba(3, 9, 22, 0.88) 100%
        ),
        url("pics/185631-876210585_medium.mp4");

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ANIMATED AMBIENT GLOW */

#home::before {
    position: absolute;
    z-index: -1;
    inset: -30%;
    pointer-events: none;

    background:
        radial-gradient(
            circle at 25% 45%,
            rgba(0, 140, 255, 0.16),
            transparent 42%
        ),
        radial-gradient(
            circle at 75% 65%,
            rgba(92, 45, 200, 0.12),
            transparent 42%
        );

    content: "";
    animation: cyberGlow 18s ease-in-out infinite alternate;
}

/* SUBTLE MOVING DIGITAL GRID */

#home::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(65, 160, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(65, 160, 255, 0.035) 1px,
            transparent 1px
        );

    background-size: 80px 80px;
    content: "";
    animation: cyberGrid 30s linear infinite;
}

#home h1 {
    position: relative;
    z-index: 1;
    max-width: 950px;
    margin: 0 0 28px;

    color: var(--color-white);
    font-size: clamp(2.7rem, 5.5vw, 5rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.045em;

    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

#home > p {
    position: relative;
    z-index: 1;
    max-width: 690px;
    margin: 0 0 36px;

    color: #c4d4e7;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.85;
}

.hero-actions {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* =========================================
   BUTTONS
   ========================================= */

.button,
#portfolio article > a:last-child {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;

    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 9px;

    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;

    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.button:hover,
#portfolio article > a:last-child:hover {
    transform: translateY(-3px);
}

.button-primary,
#portfolio article > a:last-child {
    border-color: #348bff;
    color: var(--color-white);
    background: var(--color-blue-dark);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.24);
}

.button-primary:hover,
#portfolio article > a:last-child:hover {
    border-color: #60a5fa;
    background: #3478f6;
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.34);
}

.button-secondary {
    border-color: rgba(180, 205, 235, 0.4);
    color: var(--color-white);
    background: rgba(12, 26, 48, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.button-secondary:hover {
    border-color: var(--color-cyan);
    color: var(--color-white);
    background: rgba(37, 99, 235, 0.22);
}

/* =========================================
   PORTFOLIO
   ========================================= */

#portfolio {
    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(37, 99, 235, 0.07),
            transparent 35%
        ),
        #081222;
}

.portfolio {
    display: grid;
    max-width: 900px;
    margin-inline: auto;
    gap: 30px;
}

.portfolio-item {
    overflow: hidden;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background: var(--color-surface);
    box-shadow: var(--shadow-small);

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.portfolio-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.portfolio-item > a:first-child {
    display: block;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    background: #0a1729;
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 400ms ease;
}

.portfolio-item:hover img {
    transform: scale(1.025);
}

.portfolio-item h3,
.portfolio-item p,
.portfolio-item > a:last-child {
    margin-right: 30px;
    margin-left: 30px;
}

.portfolio-item h3 {
    margin-top: 28px;
    color: var(--color-white);
    font-size: 1.55rem;
}

.portfolio-item p {
    color: var(--color-text-light);
}

.portfolio-item > a:last-child {
    margin-top: 6px;
    margin-bottom: 30px;
}

/* =========================================
   SERVICES
   ========================================= */

#services {
    background: #0c192b;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 980px;
    margin-inline: auto;
    gap: 24px;
}

.service-card {
    position: relative;
    padding: 36px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background: var(--color-surface);
    box-shadow: var(--shadow-small);

    transition:
        border-color var(--transition),
        transform var(--transition);
}

.service-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-4px);
}

.service-card > h3 {
    color: var(--color-white);
    font-size: 1.45rem;
}

.service-card > p {
    color: var(--color-text-light);
}

.service-card ul {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.service-card li {
    position: relative;
    margin-bottom: 13px;
    padding-left: 30px;
    color: var(--color-text);
}

.service-card li::before {
    position: absolute;
    top: 0;
    left: 0;

    color: var(--color-cyan);
    content: "✓";
    font-weight: 900;
}

.featured-service {
    border: 1px solid rgba(59, 130, 246, 0.65);

    background:
        linear-gradient(
            145deg,
            rgba(37, 99, 235, 0.10),
            transparent 65%
        ),
        var(--color-surface);

    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.featured-service::before {
    position: absolute;
    top: -14px;
    right: 24px;

    padding: 5px 12px;
    border-radius: 999px;

    color: var(--color-white);
    background: var(--color-blue-dark);

    content: "COMPLETE CARE";
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* =========================================
   PROCESS
   ========================================= */

#process {
    background: #081222;
}

#process ol {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
    gap: 22px;

    counter-reset: process-step;
    list-style: none;
}

#process li {
    position: relative;
    padding: 30px 24px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background: var(--color-surface);
    counter-increment: process-step;

    transition:
        border-color var(--transition),
        transform var(--transition);
}

#process li:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-4px);
}

#process li::before {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 50%;

    color: var(--color-cyan);
    background: rgba(56, 189, 248, 0.08);

    content: counter(process-step);
    font-weight: 800;
}

#process li h3 {
    color: var(--color-white);
}

#process li p {
    margin-bottom: 0;
    color: var(--color-text-light);
}

/* =========================================
   ABOUT
   ========================================= */

#about {
    display: grid;
    grid-template-columns: 280px minmax(0, 650px);
    align-items: center;
    justify-content: center;
    column-gap: 64px;

    background:
        radial-gradient(
            circle at 15% 50%,
            rgba(37, 99, 235, 0.12),
            transparent 38%
        ),
        #0c192b;
}

#about h2 {
    grid-column: 2;
    color: var(--color-white);
    text-align: left;
}

#about img {
    width: 280px;
    height: 340px;

    border: 4px solid rgba(148, 180, 220, 0.18);
    border-radius: var(--border-radius);

    grid-column: 1;
    grid-row: 1 / span 3;

    object-fit: cover;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

#about p {
    grid-column: 2;
    margin-bottom: 18px;
    color: var(--color-text);
    font-size: 1.05rem;
}

/* =========================================
   CONTACT
   ========================================= */

#contact {
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(37, 99, 235, 0.12),
            transparent 30%
        ),
        #081222;
}

#contact form {
    display: grid;
    max-width: 720px;
    margin-inline: auto;
    padding: 40px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background: var(--color-surface);
    box-shadow: var(--shadow-medium);
    gap: 22px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 750;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(148, 180, 220, 0.25);
    border-radius: 8px;
    outline: none;

    color: var(--color-white);
    background: #0a1729;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-group input {
    min-height: 50px;
    padding: 10px 14px;
}

.form-group textarea {
    min-height: 150px;
    padding: 13px 14px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #788da8;
}

#contact button {
    min-height: 54px;
    margin-top: 5px;

    border: 1px solid #348bff;
    border-radius: 9px;

    color: var(--color-white);
    background: var(--color-blue-dark);
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.22);

    cursor: pointer;
    font-weight: 800;

    transition:
        background-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

#contact button:hover {
    background: #3478f6;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
    transform: translateY(-2px);
}

/* NETLIFY HONEYPOT FIELD */

.hidden-field {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* =========================================
   FOOTER
   ========================================= */

footer {
    padding: 30px 24px;
    border-top: 1px solid var(--color-border);

    color: var(--color-text-light);
    background: var(--color-navy-dark);
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes cyberGlow {
    0% {
        opacity: 0.45;
        transform: translate(-2%, 0) scale(1);
    }

    50% {
        opacity: 0.75;
        transform: translate(2%, -2%) scale(1.05);
    }

    100% {
        opacity: 0.5;
        transform: translate(-1%, 2%) scale(1);
    }
}

@keyframes cyberGrid {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 80px 80px;
    }
}

/* =========================================
   ACCESSIBILITY
   ========================================= */

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-cyan);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #home::before,
    #home::after {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   TABLET RESPONSIVE
   ========================================= */

@media (max-width: 850px) {
    section {
        padding: 80px 32px;
    }

    nav {
        min-height: auto;
        padding-top: 18px;
        padding-bottom: 18px;
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }

    #home {
        min-height: 620px;
        padding: 100px 32px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    #process ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #about {
        grid-template-columns: minmax(0, 650px);
        text-align: center;
    }

    #about h2,
    #about img,
    #about p {
        grid-column: 1;
    }

    #about h2 {
        text-align: center;
    }

    #about img {
        width: 220px;
        height: 260px;
        margin: 0 auto 34px;
        grid-row: auto;
    }
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 560px) {
    html {
        scroll-padding-top: 155px;
    }

    section {
        padding: 70px 20px;
    }

    nav {
        width: calc(100% - 32px);
    }

    nav ul {
        gap: 10px 16px;
    }

    nav ul a {
        font-size: 0.82rem;
    }

    #home {
        min-height: 580px;
        padding: 90px 20px;
        background-position: center;
    }

    #home h1 {
        font-size: clamp(2.3rem, 9vw, 3.4rem);
        letter-spacing: -0.035em;
    }

    #home > p {
        font-size: 1rem;
        line-height: 1.7;
    }

    #home .hero-actions {
        width: 100%;
        flex-direction: column;
    }

    #home .hero-actions .button {
        width: 100%;
        max-width: 340px;
    }

    .portfolio-item h3,
    .portfolio-item p,
    .portfolio-item > a:last-child {
        margin-right: 22px;
        margin-left: 22px;
    }

    .service-card {
        padding: 28px 24px;
    }

    #process ol {
        grid-template-columns: 1fr;
    }

    #contact form {
        padding: 28px 22px;
    }
}


/* =========================================
   ANIMATED VIDEO HERO BACKGROUND
   ========================================= */

/* Hero container */

#home {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background: #050b17;
}

/* Background video */

.hero-video {
    position: absolute;
    z-index: -2;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    pointer-events: none;
}

/* Dark overlay for readable text */

#home::before {
    position: absolute;
    z-index: -1;
    inset: 0;

    background: linear-gradient(
        180deg,
        rgba(3, 9, 22, 0.70),
        rgba(3, 9, 22, 0.50),
        rgba(3, 9, 22, 0.80)
    );

    content: "";
    animation: none;
    pointer-events: none;
}

/* Remove the old animated grid */

#home::after {
    content: none;
}

/* Keep hero content above video */

#home h1,
#home > p,
#home .hero-actions {
    position: relative;
    z-index: 1;
}

/* Mobile adjustments */

@media (max-width: 560px) {
    .hero-video {
        object-position: center;
    }

    #home::before {
        background: rgba(3, 9, 22, 0.70);
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    #home {
        background:
            linear-gradient(
                rgba(3, 9, 22, 0.75),
                rgba(3, 9, 22, 0.85)
            ),
            url("cyber-hero.png") center / cover no-repeat;
    }
}

