@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800;900&family=DM+Sans:wght@300;400;500&display=swap');

:root {
    --red:          #E8002D;
    --red-deep:     #B8001E;
    --red-glow:     rgba(232,0,45,0.25);

    --bg-hero:         #0D0608;
    --bg-section:      #110609;
    --bg-section-alt:  #140709;
    --bg-card:         #1E0C0E;
    --bg-card-dark:    #180A0C;

    --text-head:        hsl(30, 17%, 93%);
    --text-body:        #B0AAA5;
    --text-muted:       #6A6460;
    --text-hero:        #F5F2F0;
    --text-hero-dim:    rgba(245,242,240,0.6);

    --white:        #F0EDEA;
    --border-light: rgba(255,255,255,0.07);
    --border-red:   rgba(232,0,45,0.2);
    --shadow-card:  0 2px 16px rgba(0,0,0,0.35);
    --shadow-red:   0 0 30px rgba(232,0,45,0.15);

    --hero-card-bg:     rgba(18,5,8,0.78);
    --hero-card-border: rgba(232,0,45,0.22);
    --hero-card-shadow: 0 28px 70px rgba(0,0,0,0.6);
    --about-photo-bg:   #0A0406;
    --project-card-bg:  #2C2C2C;
    --project-card-hover: #333333;
    --sticky-nav-bg:    rgba(13,6,8,0.88);
    --footer-bg:        #080305;
    --grid-line:        rgba(255,255,255,0.018);
}

[data-theme="light"] {
    --red:          #B8001E;
    --red-deep:     #8C0016;
    --red-glow:     rgba(184,0,30,0.12);

    /* Backgrounds — warm off-whites, no pure white */
    --bg-hero:         #F0EBE6;
    --bg-section:      #EDE7E2;
    --bg-section-alt:  #E7E1DB;
    --bg-card:         #FAF7F5;
    --bg-card-dark:    #E2DBD6;

    /* Text — warm near-blacks, never pure #000 */
    --text-head:        #1C0D0F;
    --text-body:        #3D2C2E;
    --text-muted:       #7A6A6C;
    --text-hero:        #1C0D0F;
    --text-hero-dim:    rgba(28,13,15,0.55);

    --white:            #1C0D0F;
    --border-light:     rgba(0,0,0,0.09);
    --border-red:       rgba(184,0,30,0.16);

    /* Layered shadows — key light + ambient fill */
    --shadow-card:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 12px rgba(0,0,0,0.06),
        0 12px 28px rgba(0,0,0,0.05);
    --shadow-red:       0 0 0 1px rgba(184,0,30,0.08), 0 8px 24px rgba(184,0,30,0.06);

    --hero-card-bg:     #FAF7F5;
    --hero-card-border: rgba(0,0,0,0.08);
    --hero-card-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 6px 16px rgba(0,0,0,0.07),
        0 20px 48px rgba(0,0,0,0.06);

    --about-photo-bg:   #E2DBD6;
    --project-card-bg:  #FAF7F5;
    --project-card-hover: #F5F1EE;
    --sticky-nav-bg:    rgba(240,235,230,0.94);
    --footer-bg:        #DDD7D2;
    --grid-line:        rgba(0,0,0,0.035);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-body);
    background: var(--bg-hero);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ── Theme Toggle ── */
.theme-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(232,0,45,0.2);
    background: rgba(232,0,45,0.07);
    color: var(--text-hero-dim);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: rgba(232,0,45,0.18);
    color: var(--text-hero);
    box-shadow: 0 0 12px var(--red-glow);
}

[data-theme="light"] .theme-toggle {
    border: 1px solid rgba(0,0,0,0.1);
    background: #FAF7F5;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 3px 8px rgba(0,0,0,0.06);
    color: var(--text-muted);
}

[data-theme="light"] .theme-toggle:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.2);
    color: var(--red);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 12px rgba(0,0,0,0.08),
        0 0 0 3px rgba(184,0,30,0.06);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 40px;
    background:
        radial-gradient(ellipse at 10% 50%, rgba(232,0,45,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 20%, rgba(180,0,30,0.12) 0%, transparent 50%),
        var(--bg-hero);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

[data-theme="light"] .hero {
    background:
        radial-gradient(ellipse at 10% 50%, rgba(184,0,30,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(184,0,30,0.04) 0%, transparent 45%),
        var(--bg-hero);
}

.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent 5%, var(--red) 25%, var(--red) 75%, transparent 95%);
    opacity: 0.7;
}

[data-theme="light"] .hero::after {
    opacity: 0.35;
}

.hero-card {
    width: 100%;
    max-width: 1120px;
    padding: 2.2rem 2.8rem 3.2rem;
    border-radius: 22px;
    background: var(--hero-card-bg);
    border: 1px solid var(--hero-card-border);
    box-shadow: var(--shadow-red), var(--hero-card-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red) 0%, #fff 50%, var(--red) 100%);
}

[data-theme="light"] .hero-card::before {
    background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
    opacity: 0.6;
}

.hero-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.8rem;
}

.btn-resume {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(232,0,45,0.2);
    background: rgba(232,0,45,0.07);
    color: var(--text-hero-dim);
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.btn-resume:hover {
    transform: translateY(-2px);
    background: rgba(232,0,45,0.18);
    color: var(--text-hero);
    box-shadow: 0 0 12px var(--red-glow);
}

[data-theme="light"] .btn-resume {
    border: 1px solid rgba(0,0,0,0.1);
    background: #FAF7F5;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 3px 8px rgba(0,0,0,0.06);
    color: var(--text-muted);
}

[data-theme="light"] .btn-resume:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.2);
    color: var(--red);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.2rem;
    padding: 0;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-hero-dim);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: color 0.25s;
    position: relative;
    padding-bottom: 4px;
}

.nav-link:hover { color: var(--text-hero); }
.nav-link.active { color: var(--text-hero); }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 100%; height: 2px;
    background: var(--red);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--red-glow);
}

[data-theme="light"] .nav-link.active::after {
    box-shadow: none;
}

.contact {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(232,0,45,0.2);
    background: rgba(232,0,45,0.07);
    cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text-hero);
    border-radius: 1px;
    transition: all 0.3s;
}

.hamburger:hover { background: rgba(232,0,45,0.16); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

[data-theme="light"] .hamburger {
    border: 1px solid rgba(0,0,0,0.1);
    background: #FAF7F5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07), 0 3px 8px rgba(0,0,0,0.06);
}

[data-theme="light"] .hamburger:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.2);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-hero-dim);
    font-weight: 600;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3px;
    color: var(--red);
    margin: 0;
}

.hero-name { display: block; }

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-hero-dim);
    margin-top: 0.2rem;
}

.hero-highlight {
    color: var(--text-hero);
    font-weight: 700;
}

.social-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.social-btn {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(232,0,45,0.2);
    background: rgba(232,0,45,0.07);
    color: var(--text-hero-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
    background: rgba(232,0,45,0.18);
    color: var(--text-hero);
    box-shadow: 0 0 12px var(--red-glow);
}

[data-theme="light"] .social-btn {
    border: 1px solid rgba(0,0,0,0.1);
    background: #FAF7F5;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 3px 8px rgba(0,0,0,0.06);
    color: var(--text-muted);
}

[data-theme="light"] .social-btn:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.2);
    color: var(--red);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeUp 0.8s 0.2s ease both;
}

.hero-photo-wrap {
    position: relative;
    width: 300px;
    height: 360px;
    flex-shrink: 0;
}

.hero-photo-wrap::before {
    content: '';
    position: absolute;
    top: -8px; right: -8px;
    width: 60%; height: 60%;
    border-top: 3px solid var(--red);
    border-right: 3px solid var(--red);
    border-radius: 0 14px 0 0;
    pointer-events: none;
    z-index: 3;
}

.hero-photo-wrap::after {
    content: '';
    position: absolute;
    bottom: -8px; left: -8px;
    width: 60%; height: 60%;
    border-bottom: 3px solid var(--red);
    border-left: 3px solid var(--red);
    border-radius: 0 0 0 14px;
    pointer-events: none;
    z-index: 3;
}

[data-theme="light"] .hero-photo-wrap::before,
[data-theme="light"] .hero-photo-wrap::after {
    opacity: 0.5;
}

.hero-photo-inner {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(170deg, #1A0000 0%, #5C0A0A 35%, #8B0000 70%, #1A0000 100%);
    border: 1px solid rgba(232,0,45,0.3);
    box-shadow: 0 0 40px rgba(232,0,45,0.2), 0 16px 40px rgba(0,0,0,0.6);
}

[data-theme="light"] .hero-photo-inner {
    background: linear-gradient(170deg, #f0e4e6 0%, #f5d0d4 35%, #edd8da 70%, #f0e4e6 100%);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 6px 18px rgba(0,0,0,0.1),
        0 20px 48px rgba(0,0,0,0.1);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(232,0,45,0.5);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-photo-placeholder i { font-size: 2.5rem; opacity: 0.4; }

.btn {
    padding: 11px 26px;
    border: none;
    border-radius: 7px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 0 18px var(--red-glow);
}

.btn-primary:hover {
    background: #ff1133;
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(232,0,45,0.5);
}

[data-theme="light"] .btn-primary {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.1),
        0 4px 12px rgba(184,0,30,0.25);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.1),
        0 6px 18px rgba(184,0,30,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-hero-dim);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    border-color: var(--red);
    color: var(--text-hero);
    background: rgba(232,0,45,0.08);
}

[data-theme="light"] .btn-secondary {
    border: 1px solid rgba(0,0,0,0.12);
    background: #FAF7F5;
    color: var(--text-muted);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 3px 8px rgba(0,0,0,0.06);
}

[data-theme="light"] .btn-secondary:hover {
    border-color: rgba(184,0,30,0.25);
    color: var(--red);
    background: #FFF;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 12px rgba(0,0,0,0.08);
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-head);
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px; height: 3px;
    background: var(--red);
    margin: 0.65rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 8px var(--red-glow);
}

[data-theme="light"] .section-title::after {
    box-shadow: none;
}

/* ── About ── */
.about {
    padding: 0;
    background: var(--bg-section);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.about .section-title { display: none; }

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
    min-width: 0;
    max-width: 100%;
}

.about-photo {
    position: sticky;
    top: 0;
    align-self: start;
    background: var(--about-photo-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
    min-height: 560px;
    transition: background 0.3s ease;
}

.about-photo::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 300px;
    background: radial-gradient(ellipse, rgba(232,0,45,0.25) 0%, transparent 70%);
    pointer-events: none;
}

[data-theme="light"] .about-photo::before {
    background: radial-gradient(ellipse, rgba(184,0,30,0.06) 0%, transparent 70%);
}

.about-photo img {
    width: 280px;
    height: 380px;
    object-fit: cover;
    object-position: center top;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 14px;
    border: 1px solid rgba(232,0,45,0.2);
    box-shadow: 0 0 60px rgba(232,0,45,0.2), 0 20px 40px rgba(0,0,0,0.5);
    background: linear-gradient(170deg, #1A0000 0%, #5C0A0A 40%, #8B0000 100%);
}

[data-theme="light"] .about-photo img {
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 6px 18px rgba(0,0,0,0.1),
        0 24px 56px rgba(0,0,0,0.12);
    background: linear-gradient(170deg, #f0e4e6 0%, #f5d0d4 40%, #edd8da 100%);
}

.about-text {
    margin-top: 1.5rem;
    padding: 4rem 3.5rem 4rem 4rem;
    display: flex;
    text-align: justify;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.about-text::before {
    content: 'About Me';
    font-family: 'Syne', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--red);
    display: block;
}

.about-text h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--text-head);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 0;
}

.about-text h2 em {
    font-style: normal;
    color: var(--red);
}

.about-text p {
    color: var(--text-body);
    line-height: 1.85;
    font-size: 0.95rem;
    max-width: 460px;
}

.about-certs {
    border-top: 1px solid rgba(232,0,45,0.12);
    margin-bottom: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.about-certs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(232,0,45,0.06);
    border: 1px solid rgba(232,0,45,0.18);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    color: var(--red);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    transition: background 0.2s;
}

.about-certs-toggle:hover { background: rgba(232,0,45,0.12); }

[data-theme="light"] .about-certs-toggle {
    background: rgba(184,0,30,0.04);
    border: 1px solid rgba(0,0,0,0.09);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.04);
}

[data-theme="light"] .about-certs-toggle:hover {
    background: rgba(184,0,30,0.07);
    border-color: rgba(184,0,30,0.18);
}

.about-certs-toggle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.certs-chevron {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.about-certs-toggle.open .certs-chevron {
    transform: rotate(180deg);
}

.cert-list {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.35s ease;
    margin-top: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.cert-list.open {
    grid-template-rows: 1fr;
    margin-top: 0.75rem;
}

.cert-list > .cert-list-scroll {
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.cert-list.open > .cert-list-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.85rem;
    padding: 0.15rem 0.1rem 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 0, 45, 0.35) transparent;
}

.cert-list.open > .cert-list-scroll::-webkit-scrollbar {
    height: 6px;
}

.cert-list.open > .cert-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(232, 0, 45, 0.35);
    border-radius: 999px;
}

.cert-item {
    flex: 0 0 240px;
    width: 240px;
    padding: 1rem 1.2rem;
    background: rgba(232,0,45,0.04);
    border: 1px solid rgba(232,0,45,0.12);
    border-top: 2px solid var(--red);
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
}

.cert-item:hover {
    background: rgba(232,0,45,0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(232,0,45,0.1);
}

[data-theme="light"] .cert-item {
    background: #FAF7F5;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: 2px solid var(--red);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 3px 8px rgba(0,0,0,0.05);
}

[data-theme="light"] .cert-item:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.18);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.07),
        0 4px 14px rgba(0,0,0,0.08);
}

.cert-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-head);
    margin-bottom: 0.2rem;
}

.cert-name a, .cert-name a:visited { color: var(--text-head); text-decoration: none; }
.cert-name a:hover { color: var(--red); }

.cert-issuer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.about-bottom-lines {
    height: 30px;
    position: relative;
    background: var(--bg-section);
}

.about-bottom-lines::before {
    content: '';
    position: absolute;
    bottom: 18px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--red) 25%, var(--red) 75%, transparent 100%);
    opacity: 0.45;
}

.about-bottom-lines::after {
    content: '';
    position: absolute;
    bottom: 6px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(232,0,45,0.25) 35%, rgba(232,0,45,0.25) 65%, transparent 90%);
    opacity: 0.4;
}

[data-theme="light"] .about-bottom-lines::before,
[data-theme="light"] .about-bottom-lines::after {
    opacity: 0.2;
}

/* ── Experience ── */
.experience {
    padding: 100px 0;
    background: var(--bg-section-alt);
    position: relative;
    transition: background 0.3s ease;
}

.exp-timeline {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.exp-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 4px;
}

.exp-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--bg-section-alt);
    box-shadow: 0 0 10px var(--red-glow);
    flex-shrink: 0;
    z-index: 1;
}

[data-theme="light"] .exp-dot {
    box-shadow: 0 0 0 3px rgba(184,0,30,0.12);
}

.exp-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(180deg, rgba(232,0,45,0.4), rgba(232,0,45,0.08));
    margin-top: 6px;
    min-height: 40px;
}

[data-theme="light"] .exp-line {
    background: linear-gradient(180deg, rgba(184,0,30,0.2), rgba(184,0,30,0.04));
}

.exp-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.3s ease;
}

[data-theme="light"] .exp-card {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.05),
        0 4px 12px rgba(0,0,0,0.05),
        0 10px 24px rgba(0,0,0,0.04);
}

.exp-card:hover {
    border-color: rgba(232,0,45,0.3);
    box-shadow: 0 4px 24px rgba(232,0,45,0.08);
}

[data-theme="light"] .exp-card:hover {
    border-color: rgba(184,0,30,0.2);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 6px 18px rgba(0,0,0,0.08),
        0 16px 36px rgba(0,0,0,0.06);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.exp-role {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-head);
    margin-bottom: 0.3rem;
}

.exp-company {
    font-size: 0.82rem;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.exp-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(232,0,45,0.06);
    border: 1px solid rgba(232,0,45,0.12);
    border-radius: 20px;
    flex-shrink: 0;
}

[data-theme="light"] .exp-date {
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.09);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.exp-desc {
    text-align: justify;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.exp-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-body);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    background: transparent;
}

[data-theme="light"] .exp-tag {
    border: 1px solid rgba(0,0,0,0.09);
    background: rgba(0,0,0,0.03);
}

/* ── Projects ── */
.projects {
    padding: 100px 0 120px;
    background: var(--bg-section);
    position: relative;
    transition: background 0.3s ease;
}

.projects::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.projects .section-title { color: var(--text-head); }
.projects .section-title::after { background: var(--red); }

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(232,0,45,0.25);
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s;
}

.filter-btn:hover {
    border-color: var(--red);
    color: var(--text-head);
    background: rgba(232,0,45,0.1);
}

.filter-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 0 16px var(--red-glow);
}

[data-theme="light"] .filter-btn {
    border: 1px solid rgba(0,0,0,0.1);
    background: #FAF7F5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.04);
}

[data-theme="light"] .filter-btn:hover {
    background: #FFF;
    border-color: rgba(184,0,30,0.2);
    color: var(--red);
    box-shadow: 0 1px 2px rgba(0,0,0,0.07), 0 3px 10px rgba(0,0,0,0.07);
}

[data-theme="light"] .filter-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.1),
        0 4px 12px rgba(184,0,30,0.25);
}

.masonry-grid {
    columns: 3;
    column-gap: 1.4rem;
    position: relative;
    z-index: 1;
}

.project-card {
    break-inside: avoid;
    margin-bottom: 1.4rem;
    background: var(--project-card-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .project-card {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.05),
        0 4px 12px rgba(0,0,0,0.05),
        0 10px 24px rgba(0,0,0,0.04);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--red);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232,0,45,0.4);
    background: var(--project-card-hover);
    box-shadow: 0 12px 40px rgba(232,0,45,0.12), 0 4px 16px rgba(0,0,0,0.1);
}

[data-theme="light"] .project-card:hover {
    border-color: rgba(184,0,30,0.18);
    background: var(--project-card-hover);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 8px 20px rgba(0,0,0,0.09),
        0 18px 40px rgba(0,0,0,0.07);
}

.project-card:hover::before { opacity: 1; }
.project-card.hidden { display: none; }

.project-card:nth-child(3n+1) { padding-bottom: 2.5rem; }
.project-card:nth-child(3n+2) { padding-bottom: 1.5rem; }
.project-card:nth-child(3n)   { padding-bottom: 3rem; }

.project-badge {
    display: inline-block;
    background: rgba(232,0,45,0.15);
    color: var(--red);
    border: 1px solid rgba(232,0,45,0.3);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    align-self: flex-start;
}

[data-theme="light"] .project-badge {
    background: rgba(184,0,30,0.07);
    border: 1px solid rgba(184,0,30,0.18);
}

.project-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-head);
    line-height: 1.3;
}

.project-card p {
    text-align: justify;
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.7;
}

.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tag {
    background: rgba(91,184,232,0.1);
    color: #3a9fcc;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(91,184,232,0.2);
}

[data-theme="light"] .tag {
    background: #EBF4FB;
    color: #1E6FA0;
    border: 1px solid #C6DDEF;
}

.project-link {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    align-self: flex-start;
    transition: color 0.25s, letter-spacing 0.25s;
}

.project-link:hover { color: var(--red-deep); letter-spacing: 0.5px; }

/* ── Skills ── */
.skills {
    padding: 80px 0;
    background: var(--bg-section-alt);
    position: relative;
    transition: background 0.3s ease;
}

.skills-wrap {
    border: 1px solid rgba(232,0,45,0.12);
    border-radius: 16px;
    background: var(--bg-card);
    padding: 2.5rem 2.8rem;
    transition: background 0.3s ease;
}

[data-theme="light"] .skills-wrap {
    border: 1px solid rgba(0,0,0,0.09);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.05),
        0 4px 14px rgba(0,0,0,0.06),
        0 12px 28px rgba(0,0,0,0.05);
}

.skills-wrap-title {
    text-align: center;
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 5px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 2.2rem;
}

.skills-grid {
    display: flex;
    gap: 0;
    align-items: flex-start;
    flex-wrap: wrap;
}

.skill-category {
    flex: 1;
    min-width: 160px;
    padding: 0 2rem;
    border-right: 1px solid rgba(232,0,45,0.1);
}

[data-theme="light"] .skill-category {
    border-right: 1px solid rgba(0,0,0,0.07);
}

.skill-category:first-child { padding-left: 0; }
.skill-category:last-child  { padding-right: 0; border-right: none; }

.skill-category h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 1rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-badge {
    background: transparent;
    color: var(--text-body);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    cursor: default;
    transition: all 0.2s;
    white-space: nowrap;
}

[data-theme="light"] .skill-badge {
    border: 1px solid rgba(0,0,0,0.09);
    background: rgba(0,0,0,0.02);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.skill-badge:hover {
    border-color: var(--red);
    color: var(--text-head);
    background: rgba(232,0,45,0.07);
}

[data-theme="light"] .skill-badge:hover {
    border-color: rgba(184,0,30,0.25);
    color: var(--red);
    background: rgba(184,0,30,0.05);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 3px 8px rgba(0,0,0,0.06);
}

/* ── Footer ── */
.footer-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.footer-socials .social-btn {
    border: 1.5px solid var(--border-light);
    background: var(--bg-card-dark);
    color: var(--text-muted);
    box-shadow: none;
}

[data-theme="light"] .footer-socials .social-btn {
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.7);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.05);
}

.footer-socials .social-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 0 14px var(--red-glow);
}

[data-theme="light"] .footer-socials .social-btn:hover {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.1),
        0 4px 12px rgba(184,0,30,0.2);
}

.footer {
    background: var(--footer-bg);
    color: var(--text-muted);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    position: relative;
    transition: background 0.3s ease;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red) 40%, var(--white) 60%, transparent);
    opacity: 0.4;
}

[data-theme="light"] .footer::before {
    background: linear-gradient(90deg, transparent, var(--red) 40%, var(--red) 60%, transparent);
    opacity: 0.2;
}

/* ── Sticky Nav ── */
.sticky-nav {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 10px 14px;
    background: var(--sticky-nav-bg);
    border: 1px solid rgba(232,0,45,0.25);
    border-radius: 50px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 0 20px rgba(232,0,45,0.1);
    transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

[data-theme="light"] .sticky-nav {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 6px 18px rgba(0,0,0,0.1),
        0 14px 36px rgba(0,0,0,0.08);
}

.sticky-nav.visible { top: 20px; }

.sticky-nav-link {
    text-decoration: none;
    color: var(--text-hero-dim);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 14px;
    border-radius: 30px;
    transition: all 0.2s;
    white-space: nowrap;
}

.sticky-nav-link:hover {
    color: var(--text-hero);
    background: rgba(232,0,45,0.1);
}

[data-theme="light"] .sticky-nav-link:hover {
    color: var(--text-head);
    background: rgba(0,0,0,0.05);
}

.sticky-nav-link.active {
    background: var(--red);
    color: #fff;
    box-shadow: 0 0 12px var(--red-glow);
}

[data-theme="light"] .sticky-nav-link.active {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.1),
        0 3px 8px rgba(184,0,30,0.2);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .about-photo { display: none; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons, .social-row { justify-content: center; }
    .hero-card { padding: 2rem 1.8rem 2.6rem; }
    .hero-visual { margin-top: 2rem; }
    .hero-photo-wrap { width: 280px; height: 320px; }
    .about-content { grid-template-columns: 1fr; }
    .exp-header { flex-direction: column; gap: 0.5rem; }
    .about-text { padding: 3rem 2rem; }
    .masonry-grid { columns: 2; }
    .skills-grid { flex-direction: column; gap: 1.5rem; }
    .skill-category { padding: 0; border-right: none; border-bottom: 1px solid rgba(232,0,45,0.1); padding-bottom: 1.2rem; }
    .skill-category:last-child { border-bottom: none; padding-bottom: 0; }
}

@media (max-width: 768px) {
    .contact { visibility: hidden; height: 0; }
    .hamburger { display: inline-flex; }
    .nav-menu { display: none; flex-direction: column; gap: 0; margin-bottom: 1.5rem; padding: 0.75rem; border-radius: 12px; background: rgba(232,0,45,0.06); border: 1px solid rgba(232,0,45,0.15); }
    .nav-menu.active { display: flex; }
    .nav-menu li { list-style: none; }
    .nav-link { display: block; padding: 0.7rem 0.8rem; font-size: 1rem; }
    .nav-link.active::after { display: none; }
    .sticky-nav { display: flex; flex-direction: row; gap: 0; padding: 8px 12px; }
    .hero-title { font-size: 3.4rem; letter-spacing: -2px; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    .masonry-grid { columns: 1; }
    .skills-grid { flex-direction: column; gap: 1.5rem; }
    .skill-category { padding: 0; border-right: none; border-bottom: 1px solid rgba(232,0,45,0.1); padding-bottom: 1.2rem; }
    .skill-category:last-child { border-bottom: none; padding-bottom: 0; }
    .section-title { font-size: 2rem; }
    .btn-resume span { display: none; }
    .exp-timeline { padding: 0 0.5rem; }

    [data-theme="light"] .skill-category {
        border-bottom: 1px solid rgba(0,0,0,0.07);
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.8rem; letter-spacing: -1.5px; }
    .hero-card { padding: 1.5rem 1.2rem 2rem; }
    .hero-photo-wrap { width: 240px; height: 280px; }
    .section-title { font-size: 1.75rem; }
}