/* Fonts */
@font-face {
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/firacode-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/oswald-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('../fonts/roboto-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/roboto-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Variables & Reset */
:root {
    color-scheme: dark light;
    --bg:          #121212;
    --bg-surface:  #181818;
    --bg-card:     #1e1e1e;
    --amber:       #FFB300;
    --amber-dim:   rgba(255, 179, 0, 0.12);
    --blue-gray:   #37474F;
    --text:        #E0E0E0;
    --text-dim:    #9e9e9e;
    --mono:        'Fira Code', monospace;
    --head:        'Oswald', sans-serif;
    --body:        'Roboto', sans-serif;
    --ease:        cubic-bezier(0.4, 0, 0.2, 1);
    --pad:         clamp(70px, 10vw, 110px) 0;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* Typography */
h1, h2, h3 { font-family: var(--head); line-height: 1.1; }

h1 { font-size: clamp(2rem, 5.5vw, 4.2rem); font-weight: 700; letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: 0.06em; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.08em; }

.text-amber { color: var(--amber); }

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    letter-spacing: 0.1em;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--amber);
    margin: 0.9rem auto 0;
}

/* Layout */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Navigation */
#nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 200;
    padding: 1.4rem 0;
    transition: padding 0.35s var(--ease), border-color 0.35s var(--ease);
    border-bottom: 1px solid transparent;
}
#nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.96);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
}
#nav.scrolled::before {
    opacity: 1;
}
#nav.scrolled {
    padding: 0.9rem 0;
    border-bottom-color: rgba(255, 179, 0, 0.08);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text);
    transition: color 0.2s;
}
.nav-logo:hover { color: var(--amber); }

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    transition: color 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--amber);
    transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--amber); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 300;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.nav-overlay.visible { opacity: 1; pointer-events: auto; }

/* Hero Section */
#hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--bg);
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 2rem clamp(1rem, 5vw, 2rem);
}
.hero-content h1 {
    color: #ffffff;
    text-shadow: 0 0 80px rgba(255, 179, 0, 0.18);
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-family: var(--mono);
    font-size: clamp(0.82rem, 1.8vw, 1rem);
    color: var(--text-dim);
    margin-bottom: 2.8rem;
    line-height: 1.9;
}

/* Decorative circuit dots */
.cdot {
    position: absolute;
    border-radius: 50%;
    background: var(--amber);
    z-index: 1;
    animation: cdot-pulse 3s ease-in-out infinite;
}
.cdot-lg { width: 10px; height: 10px; box-shadow: 0 0 18px var(--amber), 0 0 40px rgba(255,179,0,0.25); }
.cdot-sm { width: 5px;  height: 5px;  box-shadow: 0 0 10px var(--amber); animation-delay: 1.2s; }

@keyframes cdot-pulse {
    0%,100% { opacity: 1;   transform: scale(1);   }
    50%      { opacity: 0.3; transform: scale(0.75); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85rem 2.4rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    border-radius: 2px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}
.btn-amber {
    background: var(--amber);
    color: #000;
    border-color: var(--amber);
}
.btn-amber:hover {
    background: transparent;
    color: var(--amber);
    box-shadow: 0 0 30px rgba(255, 179, 0, 0.25);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--blue-gray);
}
.btn-outline:hover {
    border-color: var(--amber);
    color: var(--amber);
}
.btn svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

/* About / Persona */
#about {
    padding: var(--pad);
    background: var(--bg-surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

/* Photo */
.photo-wrap {
    position: relative;
}
.photo-frame {
    position: relative;
    border: 2px solid var(--amber);
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-card);
}
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%) contrast(1.1);
    transform: scale(1.1);
    transition: filter 0.5s, transform 1.1s var(--ease);
    display: block;
}
.photo-wrap.visible .photo-frame img { transform: scale(1); }
.photo-wrap.visible .photo-frame:hover img { filter: grayscale(50%) contrast(1.05); transform: scale(1.07); }
.photo-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255,179,0,0.12) 0%, transparent 55%);
    pointer-events: none;
}

/* About text */
.about-text h2 { margin-bottom: 0.6rem; }
.about-tagline {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--amber);
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
}
.about-text p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.about-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.badge {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 179, 0, 0.18);
    padding: 0.7rem 1.1rem;
    border-radius: 2px;
    flex: 1;
    min-width: 130px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.badge:hover {
    border-color: rgba(255, 179, 0, 0.4);
    box-shadow: 0 0 20px rgba(255,179,0,0.07);
}
.badge-icon { width: 22px; height: 22px; fill: var(--amber); flex-shrink: 0; }
.badge span { font-family: var(--mono); font-size: 0.72rem; line-height: 1.4; color: var(--text); }

/* Expertise Cards */
#expertise {
    padding: var(--pad);
    background: var(--bg);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.expertise-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-bottom: 3px solid transparent;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: border-bottom-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.expertise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--amber-dim);
    opacity: 0;
    transition: opacity 0.3s;
}
.expertise-card:hover {
    border-bottom-color: var(--amber);
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.expertise-card:hover::before { opacity: 1; }

.card-num {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--amber);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    position: relative;
}
.expertise-card h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
}
.expertise-card ul { position: relative; }
.expertise-card ul li {
    color: var(--text-dim);
    font-size: 0.88rem;
    padding: 0.38rem 0 0.38rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
}
.expertise-card ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--amber);
    font-size: 0.68rem;
    top: 0.42rem;
}

/* Experience / Timeline */
#experience {
    padding: var(--pad);
    background: var(--bg-surface);
}

.timeline {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 130px;
    top: 8px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--amber), rgba(255,179,0,0.08));
}

.timeline-entry {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0 2.5rem;
    margin-bottom: 3.2rem;
    position: relative;
}
.timeline-entry:last-child { margin-bottom: 0; }

.timeline-entry::after {
    content: '';
    position: absolute;
    left: 123px;
    top: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px rgba(255,179,0,0.15);
}

.t-date {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--amber);
    text-align: right;
    padding-top: 3px;
    padding-right: 16px;
    line-height: 1.5;
}

.t-body h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.2rem; }
.t-company a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,179,0,0.3); transition: border-color 0.2s, color 0.2s; }
.t-company a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.t-company {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--amber);
    opacity: 0.75;
    margin-bottom: 0.65rem;
}
.t-body p { color: var(--text-dim); font-size: 0.88rem; }

/* Projects Grid */
#projects {
    padding: var(--pad);
    background: var(--bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid var(--amber);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 0 2px 2px 0;
    transition: background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.project-card:hover {
    background: #222;
    transform: translateX(5px);
    box-shadow: -5px 0 30px rgba(255,179,0,0.12);
}

.p-icon { width: 36px; height: 36px; margin-bottom: 1.2rem; }
.p-icon svg { width: 100%; height: 100%; fill: var(--amber); }

.project-card h3 { color: #fff; margin-bottom: 0.7rem; font-size: 0.98rem; letter-spacing: 0.06em; }
.project-card p  { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; }

.p-tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--amber);
    background: rgba(255,179,0,0.07);
    border: 1px solid rgba(255,179,0,0.18);
    padding: 0.22rem 0.55rem;
    border-radius: 2px;
    display: inline-block;
}

/* Project archive list */
.archive-title {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    text-align: center;
    margin: 3.5rem 0 1.5rem;
}

/* Gantt chart */
.gantt-chart {
    max-width: 780px;
    margin: 0 auto;
}

.gantt-row {
    display: grid;
    grid-template-columns: 36fr 64fr;
    align-items: start;
    gap: 0 1.5rem;
    margin-bottom: 3.2rem;
}
.gantt-row:last-child { margin-bottom: 0; }

.gantt-header-row {
    margin-bottom: 1rem;
}

.gantt-axis {
    position: relative;
    height: 22px;
    border-bottom: 1px solid rgba(255, 179, 0, 0.2);
}

.gantt-tick {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    padding-bottom: 4px;
    user-select: none;
    white-space: nowrap;
}
.gantt-tick:first-child { transform: none; }
.gantt-tick:last-child  { transform: translateX(-100%); }

.pl-group-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: var(--amber);
    margin: 1.6rem 0 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,179,0,0.15);
}
.pl-group-label:first-child { margin-top: 0; }

.gantt-name {
    padding-right: 0.75rem;
}
.gantt-name strong {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.3;
}
.gantt-years {
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--amber);
    opacity: 0.7;
    margin: 2px 0 5px;
}
.gantt-tags {
    grid-column: 1 / -1;
    margin-top: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.gantt-tags .p-tag {
    font-size: 0.65rem;
    padding: 1px 5px;
}

.gantt-track {
    position: relative;
    height: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
}
.gantt-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to bottom, rgba(255,179,0,0.12) 0%, rgba(255,179,0,0.12) 100%),
        linear-gradient(to bottom, rgba(255,179,0,0.12) 0%, rgba(255,179,0,0.12) 100%),
        linear-gradient(to bottom, rgba(255,179,0,0.12) 0%, rgba(255,179,0,0.12) 100%),
        linear-gradient(to bottom, rgba(255,179,0,0.12) 0%, rgba(255,179,0,0.12) 100%),
        linear-gradient(to bottom, rgba(255,179,0,0.12) 0%, rgba(255,179,0,0.12) 100%);
    background-size: 1px 100%, 1px 100%, 1px 100%, 1px 100%, 1px 100%;
    background-position: 16.67% 0, 33.33% 0, 50% 0, 66.67% 0, 83.33% 0;
    background-repeat: no-repeat;
    border-radius: 2px;
    pointer-events: none;
}

.gantt-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 2px;
    background: var(--amber);
    opacity: 0.85;
    z-index: 1;
    min-width: 6px;
    transition: opacity 0.2s;
}
.gantt-bar:hover { opacity: 1; }

.gantt-bar.is-ongoing {
    right: 0;
    border-radius: 2px 0 0 2px;
    background: linear-gradient(to right, var(--amber) 40%, rgba(255,179,0,0.15) 100%);
}

.gantt-desc {
    grid-column: 1 / -1;
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-top: 0.25rem;
    padding-bottom: 0.1rem;
}

.gantt-desc a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,179,0,0.35);
    transition: color 0.2s, border-color 0.2s;
}
.gantt-desc a:hover {
    color: var(--text);
    border-bottom-color: var(--amber);
}

.gantt-file-links {
    grid-column: 1 / -1;
    margin-top: 0.2rem;
    font-family: var(--mono);
    font-size: 0.68rem;
}
.gantt-file-links a {
    color: var(--amber);
    text-decoration: none;
    margin-right: 0.75rem;
}
.gantt-file-links a:hover { text-decoration: underline; }
.gantt-file-links a::before {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 3px;
    vertical-align: -1px;
    background-color: var(--amber);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}
.gantt-file-links a[href$=".jpg"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-11-5.83 2.5 3.01L15.5 12l4.5 6H4l3.5-4.67L10 13.17z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-11-5.83 2.5 3.01L15.5 12l4.5 6H4l3.5-4.67L10 13.17z'/%3E%3C/svg%3E");
}
.gantt-file-links a[href^="/projects"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cellipse cx='12' cy='12' rx='4.5' ry='10' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cline x1='2' y1='12' x2='22' y2='12' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cellipse cx='12' cy='12' rx='4.5' ry='10' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cline x1='2' y1='12' x2='22' y2='12' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
}
.gantt-file-links a[href$=".pdf"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

/* Contact */
#contact {
    padding: var(--pad);
    background: var(--bg-surface);
    text-align: center;
    border-top: 1px solid rgba(255,179,0,0.08);
}
#contact h2 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.2; margin-bottom: 1.5rem; }
#contact p {
    color: var(--text-dim);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    font-size: 0.95rem;
}
.contact-btns { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer {
    padding: 2rem 0;
    background: var(--bg);
    border-top: 1px solid rgba(255,255,255,0.04);
    text-align: center;
}
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Responsive — Tablet (≤900px) */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .photo-frame { max-width: 300px; aspect-ratio: 3/4; margin: 0 auto; }

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

    .timeline::before { left: 0; }
    .timeline-entry {
        grid-template-columns: 1fr;
        padding-left: 1.8rem;
    }
    .timeline-entry::after { left: -7px; top: 4px; }
    .t-date { text-align: left; margin-bottom: 0.5rem; }
}

/* Responsive — Mobile (≤768px) */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 80vw);
        background: #161616;
        border-left: 1px solid rgba(255,179,0,0.1);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
        z-index: 200;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links a { font-size: 1rem; }
    .nav-links a::after { display: none; }

    .nav-overlay { display: block; }

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

    .contact-btns { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; text-align: center; }
}

/* Responsive — Small mobile (≤480px) */
@media (max-width: 480px) {
    .about-badges { flex-direction: column; }
    .badge { flex: none; }
}

/* Responsive — Gantt chart (≤600px) */
@media (max-width: 600px) {
    .gantt-row { grid-template-columns: 1fr; }
    .gantt-header-row { display: none; }
    .gantt-track { margin-top: 0.4rem; }
}

/* ── Light mode ── */
@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --bg:         #EAE6DC;
        --bg-surface: #E1DDD2;
        --bg-card:    #D8D3C7;
        --amber:      #9A6800;
        --amber-dim:  rgba(154, 104, 0, 0.08);
        --text:       #1A1A18;
        --text-dim:   #58564F;
        --blue-gray:  #607080;
    }

    /* Buttons */
    .btn-amber { color: #fff; }

    /* Nav */
    #nav::before { background: rgba(234, 230, 220, 0.97); }
    #nav.scrolled { border-bottom-color: rgba(154, 104, 0, 0.12); }
    .nav-overlay { background: rgba(0, 0, 0, 0.4); }

    /* Hero */
    .hero-content h1 { color: var(--text); text-shadow: 0 0 80px rgba(154, 104, 0, 0.18); }

    /* Expertise cards */
    .expertise-card { border-color: rgba(0, 0, 0, 0.07); }
    .expertise-card h3 { color: var(--text); }
    .expertise-card ul li { border-bottom-color: rgba(0, 0, 0, 0.07); }
    .expertise-card:hover { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12); }

    /* Badges */
    .badge { border-color: rgba(154, 104, 0, 0.2); }
    .badge:hover { border-color: rgba(154, 104, 0, 0.45); box-shadow: 0 0 20px rgba(154,104,0,0.08); }

    /* Timeline */
    .t-body h3 { color: var(--text); }
    .t-body a { border-bottom-color: rgba(154, 104, 0, 0.3); }
    .gantt-desc a { border-bottom-color: rgba(154,104,0,0.3); }
    .gantt-desc a:hover { border-bottom-color: var(--amber); }

    /* Gantt group labels — #9A6800 alone is 3.6:1; #7A5200 gives 5.1:1 on the beige bg */
    .pl-group-label { color: #7A5200; }

    /* Project cards */
    .project-card { border-color: rgba(0, 0, 0, 0.07); border-left-color: var(--amber); }
    .project-card h3 { color: var(--text); }
    .project-card:hover { background: var(--bg-surface); box-shadow: -5px 0 30px rgba(154,104,0,0.1); }

    /* Gantt */
    .gantt-track { background: rgba(0, 0, 0, 0.05); }
    .gantt-bar.is-ongoing { background: linear-gradient(to right, var(--amber) 40%, rgba(154,104,0,0.08) 100%); }
    .gantt-track::before {
        background-image:
            linear-gradient(to bottom, rgba(154,104,0,0.15) 0%, rgba(154,104,0,0.15) 100%),
            linear-gradient(to bottom, rgba(154,104,0,0.15) 0%, rgba(154,104,0,0.15) 100%),
            linear-gradient(to bottom, rgba(154,104,0,0.15) 0%, rgba(154,104,0,0.15) 100%),
            linear-gradient(to bottom, rgba(154,104,0,0.15) 0%, rgba(154,104,0,0.15) 100%),
            linear-gradient(to bottom, rgba(154,104,0,0.15) 0%, rgba(154,104,0,0.15) 100%);
    }

    /* Footer */
    footer { border-top-color: rgba(0, 0, 0, 0.08); }
}

/* Light mode — mobile nav drawer */
@media (prefers-color-scheme: light) and (max-width: 768px) {
    .nav-links { background: var(--bg-surface); border-left-color: rgba(154, 104, 0, 0.15); }
}
