/* ========================================
   1. GLOBAL STYLES & DESIGN SYSTEM
======================================== */


:root {
    --bg: #080D1A;
    --surface: #111A2E;
    --surface-hover: #172440;

    --text: #F1F5FF;
    --muted: #9BAAC4;

    --accent: #3B82F6;
    --accent-hover: #60A5FA;

    --border: rgba(148, 174, 220, 0.14);

    --gradient: linear-gradient(
        135deg,
        #3B82F6 0%,
        #22D3EE 55%,
        #818CF8 100%
    );

    --radius: 20px;
    --container: 1120px;
    --transition: 0.25s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}


/* ========================================
   2. NAVIGATION BAR
======================================== */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 15, 12, 0.85);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

nav {
    max-width: var(--container);
    min-height: 76px;
    margin: 0 auto;
    padding: 16px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    white-space: nowrap;
}

.logo::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.65);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

nav ul a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color var(--transition);
}

nav ul a:hover {
    color: var(--accent);
}


/* ========================================
   3. GENERAL SECTION LAYOUT
======================================== */

section {
    max-width: var(--container);
    margin: 0 auto;
    padding: 100px 28px;
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: -1.2px;
    margin-bottom: 24px;
}

section h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 16px;
    border-radius: 10px;
    background: var(--gradient);
}


/* ========================================
   4. HERO SECTION
======================================== */

.hero {
    position: relative;
    isolation: isolate;
    min-height: 82vh;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;

    overflow: hidden;
}

/* Soft gradient glow */

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: -15%;
    width: 65%;
    height: 90%;

     background: radial-gradient(
        ellipse at center,
        rgba(59, 130, 246, 0.18),
        rgba(34, 211, 238, 0.06) 40%,
        transparent 72%
    );

    pointer-events: none;
}

.hero-content {
    flex: 1 1 60%;
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 20px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
}

.hero h1 {
    max-width: 750px;
    margin-bottom: 24px;

    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -3px;

    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero-content > p:not(.eyebrow) {
    max-width: 590px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
}

/* ========================================
   5. BUTTONS
======================================== */

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    min-height: 48px;
    padding: 13px 26px;

    border: 1px solid var(--accent);
    border-radius: 999px;

    background: var(--accent);
    color: #11150c;

    font-size: 0.95rem;
    font-weight: 750;

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

.button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(198, 243, 106, 0.15);
}

.button:active {
    transform: translateY(0);
}


/* ========================================
   6. ABOUT SECTION
======================================== */

#about {
    border-top: 1px solid var(--border);
}

#about > p {
    max-width: 850px;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 2;
    white-space: pre-line;
}

#about b {
    color: var(--text);
    font-weight: 650;
}


/* ========================================
   7. PROJECTS SECTION
======================================== */

#projects {
    border-top: 1px solid var(--border);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
    min-height: 230px;
    padding: 28px;

    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.035),
        rgba(255, 255, 255, 0.008)
    );

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

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

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.55);
    background-color: var(--surface-hover);
}

.project-card h3 {
    margin-bottom: 14px;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}

.project-card p {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.project-card a {
    margin-top: auto;
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 650;
    transition: color var(--transition);
}

.project-card a:hover {
    color: var(--accent-hover);
}

.project-card a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}


/* ========================================
   8. CONTACT SECTION
======================================== */

#contact {
    position: relative;
    isolation: isolate;
    text-align: center;

    border-top: 1px solid var(--border);
}

#contact::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 15% 10%;

  background: radial-gradient(
        ellipse at center,
        rgba(59, 130, 246, 0.12),
        transparent 70%
    );

    pointer-events: none;
}

#contact h2::after {
    margin-left: auto;
    margin-right: auto;
}

#contact p {
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 1.02rem;
}


/* ========================================
   9. FOOTER
======================================== */

footer {
    padding: 26px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: var(--muted);
    font-size: 0.85rem;
}


/* ========================================
   10. TABLETS
======================================== */

@media (min-width: 641px) and (max-width: 900px) {
    nav {
        padding-inline: 24px;
    }

    nav ul {
        gap: 22px;
    }

    section {
        padding: 80px 24px;
    }

    .hero {
        min-height: auto;
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        text-align: center;
        padding-top: 90px;
        padding-bottom: 90px;
    }

    .hero-content {
        width: 100%;
        flex: auto;
    }

    .hero h1 {
        margin-inline: auto;
        font-size: clamp(2.5rem, 7vw, 4rem);
        letter-spacing: -2px;
    }

    .hero-content > p:not(.eyebrow) {
        margin-inline: auto;
    }

    .eyebrow {
        justify-content: center;
    }

    .about-image {
        flex: none;
        width: 100%;
    }

    .about-image img {
        width: 250px;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ========================================
   11. MOBILE PHONES
======================================== */

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

    nav {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        padding: 16px 18px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 24px;
    }

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

    section {
        padding: 64px 20px;
    }

    .hero {
        min-height: auto;
        flex-direction: column;
        justify-content: center;
        gap: 38px;
        padding-top: 76px;
        padding-bottom: 76px;
        text-align: center;
    }

    .hero::before {
        left: -25%;
        width: 150%;
        height: 65%;
    }

    .hero-content {
        width: 100%;
        flex: auto;
    }

    .eyebrow {
        justify-content: center;
        font-size: 0.78rem;
    }

    .hero h1 {
        margin-bottom: 20px;
        font-size: clamp(2.15rem, 9vw, 3.5rem);
        line-height: 1.12;
        letter-spacing: -1.5px;
        overflow-wrap: anywhere;
    }

    .hero-content > p:not(.eyebrow) {
        margin: 0 auto 28px;
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .about-image {
        flex: none;
        width: 100%;
    }

    .about-image img {
        width: 220px;
    }

    section h2 {
        font-size: 2rem;
    }

    #about > p {
        font-size: 0.98rem;
        line-height: 1.9;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
    }

    .project-card {
        min-height: 200px;
        padding: 24px;
    }

    #contact p {
        font-size: 0.95rem;
    }
}


/* ========================================
   12. SMALL MOBILE PHONES
======================================== */

@media (max-width: 380px) {
    nav ul {
        gap: 10px 16px;
    }

    section {
        padding-inline: 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .about-image img {
        width: 190px;
    }

    .project-card {
        padding: 20px;
    }

    .button {
        padding: 12px 21px;
    }
}


/* ========================================
   13. ACCESSIBILITY & REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
