/* ==========================================================
   SOBEJAN SRIKANTHAN — Portfolio
   Light, editorial red & white design
   ========================================================== */

/* ---- Custom Properties ---- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --border-subtle: rgba(15, 15, 15, 0.08);
    --border-medium: rgba(220, 38, 38, 0.22);
    --accent: #dc2626;
    --accent-dim: rgba(220, 38, 38, 0.12);
    --accent-glow: rgba(220, 38, 38, 0.28);
    --white: #0a0a0a;
    --off-white: #1a1a1a;
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.66);
    --text-muted: rgba(26, 26, 26, 0.42);
    --font-display: 'Plus Jakarta Sans', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --container: 1200px;
    --gutter: 24px;
    --nav-height: 80px;
}

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul, ol { list-style: none; }

/* ---- Layout ---- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---- Typography ---- */
.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.0;
    letter-spacing: -0.04em;
    color: var(--white);
}

.section-title--light {
    color: var(--off-white);
}

.section-title--xl {
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: -0.05em;
}

.label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.body-text {
    font-size: 1.1rem;
    line-height: 1.65;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    max-width: 560px;
}

.body-text + .body-text {
    margin-top: 16px;
}

.terminal-text {
    font-family: var(--font-mono);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border-radius: 0;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn--primary {
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 18px 44px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
    background: #b91c1c;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.35);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.btn--outline:hover {
    background: var(--accent-dim);
}

/* ==========================
   NAVIGATION
   ========================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 24px 0;
    transition: all 0.5s var(--ease);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 15, 15, 0.06);
    padding: 16px 0;
}

.nav__inner {
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.nav__logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
}

.nav__logo-dot {
    color: var(--accent);
}

.nav__logo:hover {
    opacity: 0.8;
}

.nav__hamburger {
    width: 32px;
    height: 20px;
    position: relative;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav__hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--off-white);
    transition: all 0.4s var(--ease);
    transform-origin: center;
}

.nav__hamburger.active span:first-child {
    transform: rotate(45deg) translate(6.5px, 6.5px);
}

.nav__hamburger.active span:last-child {
    transform: rotate(-45deg) translate(6.5px, -6.5px);
}


/* ==========================
   FULLSCREEN OVERLAY MENU
   ========================== */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease);
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.menu-overlay__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.menu-overlay__link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--off-white);
    position: relative;
    padding: 4px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--ease);
}

.menu-overlay.active .menu-overlay__link {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.active .menu-overlay__link:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.active .menu-overlay__link:nth-child(2) { transition-delay: 0.15s; }
.menu-overlay.active .menu-overlay__link:nth-child(3) { transition-delay: 0.2s; }
.menu-overlay.active .menu-overlay__link:nth-child(4) { transition-delay: 0.25s; }
.menu-overlay.active .menu-overlay__link:nth-child(5) { transition-delay: 0.3s; }

.menu-overlay__link::before {
    content: attr(data-index);
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.menu-overlay__link:hover {
    color: var(--accent);
}

.menu-overlay__footer {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 32px;
}

.menu-overlay__footer a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.menu-overlay__footer a:hover {
    color: var(--accent);
}


/* ==========================
   HERO
   ========================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Portrait background */
.hero__portrait {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../assets/images/hero-image.jpg');
    background-size: cover;
    background-position: center 22%;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(1) brightness(1);
    transform: scale(1.02);
    animation: heroPortraitReveal 1.6s var(--ease-out) forwards;
}

@keyframes heroPortraitReveal {
    from { opacity: 0; transform: scale(1.06); }
    to   { opacity: 1; transform: scale(1.02); }
}

/* Grid background */
.hero__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
    mix-blend-mode: multiply;
    opacity: 0.6;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.55) 30%,
        rgba(255, 255, 255, 0.1) 55%,
        rgba(255, 255, 255, 0) 75%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 0 clamp(32px, 7vw, 112px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.hero__left {
    max-width: 700px;
    flex-shrink: 1;
}

.hero__greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--white);
    margin-bottom: 0;
}

.hero__cursor {
    color: var(--accent);
    font-weight: 400;
    transition: opacity 0.1s;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    max-width: none;
    margin: clamp(24px, 3vw, 36px) 0 0;
    white-space: nowrap;
}

/* Hero load animation */
.anim-hero {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s var(--ease-out) forwards;
}

.anim-hero:nth-child(1) { animation-delay: 0.3s; }
.anim-hero:nth-child(2) { animation-delay: 0.55s; }
.anim-hero:nth-child(3) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 3;
    color: var(--accent);
    animation: scrollFloat 2.4s ease-in-out infinite;
}

.hero__scroll span {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 2px;
    height: 64px;
    background: rgba(220, 38, 38, 0.22);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollLine 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.hero__scroll-arrow {
    color: var(--accent);
    opacity: 0.9;
}

@keyframes scrollLine {
    0%   { top: -100%; }
    50%  { top: 0; }
    100% { top: 100%; }
}

@keyframes scrollFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}


/* ==========================
   SCROLL REVEAL
   ========================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.about__stat.reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.about__stat.reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.about__stat.reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }

.skills__category.reveal-on-scroll:nth-child(2) { transition-delay: 0.06s; }
.skills__category.reveal-on-scroll:nth-child(3) { transition-delay: 0.12s; }
.skills__category.reveal-on-scroll:nth-child(4) { transition-delay: 0.18s; }
.skills__category.reveal-on-scroll:nth-child(5) { transition-delay: 0.24s; }
.skills__category.reveal-on-scroll:nth-child(6) { transition-delay: 0.30s; }

.projects__card.reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.projects__card.reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.projects__card.reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }
.projects__card.reveal-on-scroll:nth-child(5) { transition-delay: 0.32s; }
.projects__card.reveal-on-scroll:nth-child(6) { transition-delay: 0.40s; }

.certifications__card.reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.certifications__card.reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.certifications__card.reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }


/* ==========================
   ABOUT SECTION
   ========================== */
.about {
    position: relative;
    padding: 140px 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at 100% 50%, rgba(220, 38, 38, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.about__header {
    text-align: center;
    margin-bottom: 48px;
}

.about__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about__story {
    font-size: 1.15rem;
    line-height: 1.85;
    color: rgba(26, 26, 26, 0.78);
    max-width: 800px;
}

.about__story strong {
    color: var(--white);
    font-weight: 600;
}

.about__content .body-text {
    margin-bottom: 24px;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 60px auto 0;
    text-align: center;
}

.about__stat-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.about__stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}


/* ==========================
   SKILLS SECTION
   ========================== */
.skills {
    background: var(--bg-primary);
    overflow: visible;
}

.skills > .container {
    padding-top: 40px;
    padding-bottom: 80px;
}

.skills__banner {
    background: var(--bg-elevated);
    padding: 50px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.skills__banner .label {
    margin-bottom: 8px;
}

.skills__banner .section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skills__category {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 32px 28px;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.skills__category:hover {
    border-color: var(--border-medium);
    background: var(--bg-elevated);
}

.skills__category-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills__category-title svg {
    color: var(--accent);
    flex-shrink: 0;
}

.skills__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills__tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 14px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
    letter-spacing: 0.02em;
    transition: background 0.2s var(--ease);
}

.skills__tag:hover {
    background: rgba(220, 38, 38, 0.18);
}


/* ==========================
   PROJECTS SECTION
   ========================== */
.projects {
    padding: 140px 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.projects__header {
    margin-bottom: 60px;
    text-align: center;
}

.projects__subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.6;
}

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

.projects__card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 36px 28px 28px;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
    position: relative;
}

.projects__card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.projects__card-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.projects__card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--white);
}

.projects__card-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.projects__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.projects__card-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
    letter-spacing: 0.02em;
}


/* ==========================
   CERTIFICATIONS
   ========================== */
.certifications {
    padding: 70px 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.certifications > .container {
    width: 100%;
    text-align: center;
}

.certifications .label {
    text-align: center;
    margin-bottom: 16px;
}

.certifications__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.certifications__card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px 24px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.certifications__card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.certifications__card-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.certifications__card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--white);
}

.certifications__card-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.certifications__card-status {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 12px;
    background: var(--accent-dim);
    border-radius: 100px;
}

.certifications__card-status--progress {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
}

.certifications__card--placeholder {
    opacity: 0.55;
    border-style: dashed;
    border-color: var(--border-subtle);
}

.certifications__card--placeholder:hover {
    border-color: var(--border-subtle);
    transform: none;
}


/* ==========================
   CONTACT
   ========================== */
.contact {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.contact__content {
    position: relative;
    z-index: 1;
}

.contact__content .section-title {
    margin-bottom: 24px;
}

.contact__desc {
    margin: 0 auto 48px;
    text-align: center;
    max-width: 520px;
}

.contact__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 60px;
}

.contact__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0;
    padding: 12px 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.3s var(--ease);
}

.contact__link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.contact__link svg {
    flex-shrink: 0;
}


/* ==========================
   FOOTER
   ========================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding: 80px 0 32px;
    margin-top: auto;
}

.footer__top {
    margin-bottom: 48px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer__heading {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--off-white);
    margin-bottom: 20px;
}

.footer__link {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: color 0.3s;
}

.footer__link:hover {
    color: var(--accent);
}

.footer__link--accent {
    color: var(--accent);
}

.footer__link--accent:hover {
    color: #b91c1c;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.footer__bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer__top-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer__top-link:hover {
    color: var(--accent);
}


/* ==========================
   REDUCED MOTION
   ========================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero__scroll-line::after {
        animation: none;
    }
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}


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

/* ---- Tablet: 1024px ---- */
@media (max-width: 1024px) {
    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

/* ---- Mobile + Tablet: 768px ---- */
@media (max-width: 768px) {
    :root {
        --gutter: 20px;
    }

    html, body {
        overflow-x: hidden;
    }

    section, .container {
        overflow-x: hidden;
    }

    .nav {
        padding: 12px 0;
    }

    .nav.scrolled {
        padding: 10px 0;
    }

    .nav__hamburger {
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 7px;
        padding: 12px 6px;
        -webkit-tap-highlight-color: transparent;
    }

    .nav__hamburger span {
        width: 26px;
    }

    .nav__hamburger.active span:first-child {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav__hamburger.active span:last-child {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .menu-overlay {
        padding: 100px var(--gutter) 100px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu-overlay__nav {
        gap: 4px;
        width: 100%;
        padding: 0 20px;
    }

    .menu-overlay__link {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
        padding: 10px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .menu-overlay__link::before {
        left: -28px;
        font-size: 0.6rem;
    }

    .menu-overlay__footer {
        position: relative;
        bottom: auto;
        margin-top: 40px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
    }

    .menu-overlay__footer a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 8px 4px;
    }

    .hero {
        height: 100svh;
        min-height: 100svh;
        align-items: stretch;
    }

    .hero__portrait {
        background-position: 78% 18%;
    }

    .hero__overlay {
        background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.4) 55%,
            rgba(255, 255, 255, 0.92) 100%);
    }

    .hero__content {
        padding: 0 var(--gutter);
        padding-bottom: 120px;
        max-width: 100%;
        justify-content: flex-end;
        gap: 0;
        height: 100%;
    }

    .hero__title {
        font-size: clamp(2.6rem, 10vw, 4.5rem);
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero__subtitle {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 0;
        white-space: normal;
    }

    .hero__scroll {
        bottom: 24px;
    }

    .hero__scroll-line {
        height: 44px;
    }

    .about {
        padding: 80px 0 60px;
    }

    .about__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .about__stat-num {
        font-size: 2rem;
    }

    .skills__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .skills__banner {
        padding: 30px 0;
    }

    .projects {
        padding: 80px 0;
    }

    .projects__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .certifications {
        padding: 40px 0;
    }

    .certifications__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact {
        padding: 80px 0;
    }

    .contact__links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .contact__link {
        width: 100%;
        max-width: 360px;
        justify-content: center;
    }

    .footer {
        padding: 60px 0 24px;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer__link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 8px 0;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer__top-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .anim-hero {
        animation-duration: 0.6s;
    }
}

/* ---- Small phones: 480px ---- */
@media (max-width: 480px) {
    :root {
        --gutter: 16px;
    }

    .hero__title {
        font-size: clamp(2.2rem, 11vw, 3.2rem);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section-title--xl {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }

    .about__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .about__stat-num {
        font-size: 1.75rem;
    }

    .menu-overlay__link {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .menu-overlay__link::before {
        display: none;
    }
}

/* ---- Tiny phones: 375px ---- */
@media (max-width: 375px) {
    .hero__title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .hero__subtitle {
        font-size: 0.95rem;
    }
}
