/* Engineer Root — terminal / macOS window theme */

:root {
    --bg: #000000;
    --bg-elevated: #0a0a0a;
    --surface: #111111;
    --surface-2: #1a1a1a;
    --border: #2a2a2a;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --text-dim: #777777;
    --accent: #6b9fff;
    --header-h: 56px;
    --dot-red: #ff5f57;
    --dot-yellow: #febc2e;
    --dot-green: #28c840;
    --badge-amber: #d4b06a;
    --badge-amber-border: rgba(212, 176, 106, 0.4);
    --badge-amber-bg: rgba(212, 176, 106, 0.12);
    --badge-amber-glow: rgba(212, 176, 106, 0.35);
    --badge-green-soft: #7cb87f;
    --badge-green-border: rgba(124, 184, 127, 0.38);
    --badge-green-bg: rgba(124, 184, 127, 0.12);
    --font-sans: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
    --radius: 10px;
    --window-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    --max-width: 1100px;
    --section-gap: 2.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-muted);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text);
}

/* ── header nav ────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: calc(var(--max-width) + 2.5rem);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 50%;
    filter: invert(1);
    transition: transform 0.2s ease;
}

.site-logo:hover .logo-img {
    transform: scale(1.1);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    position: relative;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    padding-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.section {
    margin-bottom: var(--section-gap);
    scroll-margin-top: 4.5rem;
}

/* ── macOS window chrome ───────────────────────────── */

.window {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--window-shadow);
}

.titlebar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 40px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
}

.traffic-lights {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: var(--dot-red); }
.dot-yellow { background: var(--dot-yellow); }
.dot-green { background: var(--dot-green); }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.window-body {
    padding: 1.75rem 2rem 2rem;
}

/* ── reveal animation ──────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── hero ──────────────────────────────────────────── */

.window--hero .window-body {
    padding: 2rem 2rem 2.25rem;
}

.hero-body {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 280px);
    gap: 2rem;
    align-items: start;
}

.prompt {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.prompt-sign {
    color: var(--text);
    margin-right: 0.35rem;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
    min-height: 1.2em;
}

.hero-title.typing::after {
    content: "▋";
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--text-muted);
    font-weight: 400;
}

.hero-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.hero-intro {
    max-width: 52ch;
    margin-bottom: 1.5rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.social-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.social-row a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-row a:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

/* status card */

.status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.35rem;
}

.status-prompt {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.status-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: baseline;
}

.status-row dt {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.status-row dd {
    font-size: 0.8rem;
    color: var(--text);
    text-align: right;
}

.status-open {
    color: var(--dot-green) !important;
}

.cursor-line {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--text-muted);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── about ─────────────────────────────────────────── */

.about-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    align-items: center;
}

.about-image-container {
    position: relative;
    width: 240px;
    height: 310px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.about-image-container:hover {
    transform: translateY(-4px);
    border-color: #444;
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.08);
}

.about-image-container:hover .about-image {
    transform: scale(1.05);
}

.about-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.04));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.about-image-container:hover .about-image-overlay {
    opacity: 0.25;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ── education timeline ─────────────────────────────── */

#education .window-body {
    padding: 1.15rem 1.35rem 1.25rem;
}

.edu-prompt {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
}

.edu-timeline {
    list-style: none;
    position: relative;
    margin: 0;
    padding: 0 0 0 1.35rem;
}

.edu-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--border);
}

.edu-item {
    position: relative;
    padding-bottom: 1rem;
}

.edu-item:last-child {
    padding-bottom: 0;
}

.edu-item::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 0.4rem;
    width: 11px;
    height: 11px;
    transform: translateX(calc(-50% + 5px));
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    background: var(--bg-elevated);
    box-sizing: border-box;
    z-index: 1;
}

.edu-item--current::before {
    border-color: var(--badge-amber);
    background: var(--badge-amber);
    box-shadow: 0 0 10px var(--badge-amber-glow);
}

.edu-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.edu-date {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}

.edu-meta .edu-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.edu-status--progress {
    color: var(--badge-amber);
    border-color: var(--badge-amber-border);
    background: var(--badge-amber-bg);
}

.edu-status--present {
    color: var(--badge-green-soft);
    border-color: var(--badge-green-border);
    background: var(--badge-green-bg);
}

.edu-school {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.edu-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    line-height: 1.5;
}

.edu-note {
    font-size: 0.74rem;
    color: var(--text-dim);
    max-width: 58ch;
    line-height: 1.5;
}

.edu-cursor {
    margin-top: 0.65rem;
}

/* ── skills row ────────────────────────────────────── */

.skills-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.window--skill {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.window--skill .window-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem 1.15rem;
}

.skill-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.6rem;
    min-height: 0;
}

.skill-icon {
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1;
}

.skill-body p {
    font-size: 0.76rem;
    color: var(--text-dim);
    line-height: 1.55;
    flex: 1;
    min-height: 3.1rem;
}

.skill-tools {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.35rem;
    min-height: 3.35rem;
}

.skill-tools li {
    font-size: 0.64rem;
    padding: 0.2rem 0.45rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    line-height: 1.3;
    max-width: 100%;
}

/* ── projects ──────────────────────────────────────── */

.window--projects-hub .projects-hub-body {
    padding: 1rem 1.15rem 1.25rem;
}

.window--projects-hub .projects-featured {
    gap: 0.75rem;
}

.titlebar--compact {
    height: 30px;
    padding: 0 0.65rem;
}

.titlebar--compact .traffic-lights {
    left: 10px;
    gap: 6px;
}

.titlebar--compact .dot {
    width: 10px;
    height: 10px;
}

.titlebar--compact .window-title {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.titlebar--plain {
    justify-content: center;
}

.titlebar--plain .window-title {
    color: var(--text-dim);
}

.titlebar--compact.titlebar--plain {
    height: 28px;
}

.titlebar--compact.titlebar--plain .window-title {
    max-width: 90%;
}

.project-window-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.projects-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text);
}

.projects-title i {
    font-size: 1rem;
    color: var(--text-muted);
}

.projects-cmd {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
}

.projects-cmd--archive {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.projects-featured {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.projects-main,
.projects-secondary,
.projects-archive {
    min-width: 0;
}

.projects-secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .projects-secondary {
        grid-template-columns: repeat(3, 1fr);
    }
}

.projects-archive-panel {
    margin-top: 0.75rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.projects-archive-panel.is-open {
    opacity: 1;
    transform: translateY(0);
}

.projects-archive-panel[hidden] {
    display: none;
}

.projects-archive-panel.is-open {
    display: block;
}

.projects-archive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .projects-archive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .projects-archive {
        grid-template-columns: repeat(3, 1fr);
    }
}

.projects-footer {
    display: flex;
    justify-content: center;
    margin-top: 0.85rem;
    padding-top: 0.15rem;
}

.projects-toggle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.projects-toggle:hover {
    color: var(--text);
    border-color: #444;
    background: var(--surface);
}

.projects-toggle .arrow {
    display: inline-block;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.projects-toggle[aria-expanded="true"] .arrow {
    transform: rotate(-90deg);
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card.window {
    box-shadow: none;
}

.project-card:hover {
    border-color: #3d3d3d;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.window--projects-hub .project-card:hover {
    transform: translateY(-1px);
}

.project-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    flex: 1;
}

/* Main featured card */
.project-card--main .project-card-inner {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .project-card--main .project-card-inner {
        grid-template-columns: 1.2fr 1fr;
        min-height: 200px;
    }
}

.project-thumb {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.project-thumb--static {
    cursor: default;
}

.project-media {
    position: relative;
    margin: 0;
    background: var(--surface-2);
    overflow: hidden;
}

.project-media-frame {
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: #0d0d0d;
}

.project-card--main .project-media-frame {
    aspect-ratio: 16 / 10;
}

@media (min-width: 720px) {
    .project-card--main .project-media {
        height: 100%;
    }

    .project-card--main .project-media-frame {
        aspect-ratio: auto;
        height: 100%;
        min-height: 200px;
    }
}

.project-card--secondary .project-media-frame,
.project-card--archive .project-media-frame {
    aspect-ratio: 16 / 10;
}

.project-media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.45s ease, filter 0.35s ease;
}

.project-card:hover .project-media-frame img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

.project-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 70%,
        rgba(0, 0, 0, 0.35) 100%
    );
    opacity: 0.6;
    transition: opacity 0.28s ease;
}

.project-card:hover .project-media::after {
    opacity: 0.4;
}

.project-card--live .project-thumb:focus-visible {
    outline: 2px solid var(--text-muted);
    outline-offset: -2px;
}

.project-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 0.85rem 0.85rem;
    flex: 1;
    min-height: 0;
}

.project-card--main .project-body {
    padding: 0.8rem 0.9rem;
    justify-content: center;
}

.project-card--secondary .project-body,
.project-card--archive .project-body {
    padding: 0.65rem 0.75rem 0.75rem;
    gap: 0.3rem;
}

.project-name {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}

.project-card--main .project-name {
    font-size: 0.98rem;
}

.project-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-stack {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
}

.project-stack li {
    font-size: 0.62rem;
    color: var(--text-muted);
    padding: 0.18rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    letter-spacing: 0.02em;
}

.project-stack li::before {
    display: none;
}

.project-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.project-card--static .project-body {
    padding-bottom: 1rem;
}

.btn-detail,
button.btn-detail {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-detail:hover,
button.btn-detail:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: #444;
}

.btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-preview i {
    font-size: 0.7rem;
}

.project-thumb--preview {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
    font: inherit;
    color: inherit;
}

body.lightbox-open {
    overflow: hidden;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.project-lightbox[hidden] {
    display: none;
}

.project-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
}

.project-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 960px);
    max-height: 88vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    box-shadow: var(--window-shadow);
    overflow: hidden;
}

.project-lightbox-img {
    display: block;
    width: 100%;
    max-height: 88vh;
    object-fit: contain;
    background: #0a0a0a;
}

.project-lightbox-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.project-lightbox-close:hover {
    background: var(--surface);
    border-color: #444;
}

.project-ext {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.project-ext i {
    font-size: 0.65rem;
}

.project-ext:hover {
    color: var(--text);
}

.project-ext--github {
    font-weight: 500;
}

.project-ext--github i {
    font-size: 0.85rem;
}

.project-ext--demo:hover {
    color: var(--text);
}

/* ── tech stack ────────────────────────────────────── */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.tech-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tech-badge:hover {
    background: var(--surface-2);
    border-color: #444;
}

/* ── soft skills ───────────────────────────────────── */

.soft-grid {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 2rem;
}

.soft-grid li {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── tools ─────────────────────────────────────────── */

.tools-list {
    list-style: none;
    margin-bottom: 1.75rem;
}

.tools-list li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.tools-key {
    color: var(--text-muted);
}

.tools-val {
    color: var(--text-dim);
}

.learning-title {
    font-size: 0.8rem;
    color: var(--text);
    margin-bottom: 0.65rem;
}

.learning-list {
    list-style: none;
    padding-left: 0.5rem;
}

.learning-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.learning-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

/* ── contact ───────────────────────────────────────── */

.contact-lead {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.contact-list i {
    width: 18px;
    text-align: center;
    color: var(--text-dim);
}

.contact-list a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── footer ────────────────────────────────────────── */

.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-to-top:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.footer-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
}

.footer-bar .traffic-lights {
    position: static;
    transform: none;
}

.footer-title {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ── responsive ────────────────────────────────────── */

@media (max-width: 900px) {
    .hero-body {
        grid-template-columns: 1fr;
    }

    .status-card {
        max-width: 320px;
    }

    .skills-row {
        grid-template-columns: 1fr;
    }


    .about-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-image-container {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
        background: rgba(0, 0, 0, 0.97);
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-header {
        position: sticky;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.65rem 0;
        border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link.active::after {
        left: 0;
        bottom: 50%;
        transform: translateY(50%);
    }
}

@media (max-width: 600px) {
    .site {
        padding: 1.25rem 1rem 3rem;
    }

    .window-body {
        padding: 1.25rem 1.15rem 1.5rem;
    }

    #education .window-body,
    .window--projects-hub .projects-hub-body {
        padding: 1rem 1rem 1.1rem;
    }

    .window--hero .window-body {
        padding: 1.35rem 1.15rem 1.5rem;
    }

    .soft-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right {
        width: 100%;
        justify-content: space-between;
    }

    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .cursor,
    .hero-title.typing::after {
        animation: none;
    }

    .projects-archive-panel {
        transition: none;
    }

    .project-card:hover {
        transform: none;
    }
}
