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

/* ── Variables ── */
:root {
    --bg: #090909;
    --bg-elevated: #0e0e0e;
    --surface: #121212;
    --surface-hover: #161616;
    --text: #e8e8e8;
    --text-secondary: #777;
    --text-tertiary: #444;
    --border: #1b1b1b;
    --border-light: #262626;
    --accent: #fff;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg);
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: #333;
    color: #fff;
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

p {
    color: var(--text-secondary);
}

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

/* ── Layout ── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 140px 0;
    position: relative;
}

.section + .section {
    border-top: 1px solid var(--border);
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(9, 9, 9, 0.7);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease-out-quart);
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    transition: opacity 0.3s;
}

.nav-logo:hover {
    opacity: 0.6;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 450;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.01em;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 8px 18px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    transition: all 0.3s var(--ease-out-quart);
    letter-spacing: 0.01em;
}

.nav-cta:hover {
    border-color: var(--text-tertiary);
    background: var(--surface);
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 32px 80px;
    position: relative;
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--border-light);
}

.hero-name {
    font-size: clamp(3.8rem, 8vw, 6.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 28px;
}

.hero-role {
    font-size: clamp(1.3rem, 2.8vw, 1.7rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.hero-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-light);
}

.hero-links {
    display: flex;
    gap: 24px;
    margin-top: 48px;
}

.hero-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    position: relative;
    padding-bottom: 2px;
    letter-spacing: 0.02em;
}

.hero-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.4s var(--ease-out-expo);
}

.hero-link:hover::after {
    width: 100%;
}

.hero-link-arrow {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.3s var(--ease-out-expo);
}

.hero-link:hover .hero-link-arrow {
    transform: translateX(4px);
}

.scroll-line {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--border-light), transparent);
    opacity: 0.5;
}

/* ── Section Header ── */
.section-header {
    margin-bottom: 80px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.section-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    flex: 1;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 440px;
}

.about-text strong {
    color: var(--text);
    font-weight: 500;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
}

.highlight-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.highlight-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.highlight-value {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.highlight-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

/* ── Skills ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.skill-column {
    background: var(--bg);
    padding: 32px 28px;
}

.skill-column-header {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-list li {
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 14px;
    transition: color 0.3s;
}

.skill-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    top: 1px;
}

.skill-list li:hover {
    color: var(--text);
}

.skill-list .expert {
    color: var(--text);
    font-weight: 500;
}

/* ── Experience ── */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 64px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--text-tertiary);
    transition: border-color 0.3s;
}

.timeline-item:hover::before {
    border-color: var(--text);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline-role {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.timeline-company span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: 8px;
    letter-spacing: 0.05em;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-body {
    max-width: 600px;
}

.timeline-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 8px;
}

.timeline-body p:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 16px;
}

.timeline-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.5;
}

/* ── Projects ── */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.project-item {
    background: var(--bg);
    padding: 40px 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: start;
    transition: background 0.4s var(--ease-out-quart);
    cursor: default;
}

.project-item:hover {
    background: var(--surface);
}

.project-item.featured {
    grid-template-columns: 1fr;
    padding: 48px 36px;
}

.project-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.project-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 560px;
    margin-bottom: 16px;
}

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

.project-tech span {
    font-size: 13px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.project-tech span::before {
    content: '#';
    opacity: 0.4;
    margin-right: 1px;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
}

.project-link:hover {
    color: var(--text);
}

.project-link-arrow {
    transition: transform 0.3s var(--ease-out-expo);
}

.project-link:hover .project-link-arrow {
    transform: translate(3px, -3px);
}

/* ── Education ── */
.education-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.education-row:first-child {
    border-top: 1px solid var(--border);
}

.education-school {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.education-degree {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.education-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ── Contact ── */
.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-heading {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 24px;
}

.contact-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 440px;
    margin-bottom: 40px;
}

.contact-links-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
}

.contact-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transition: padding 0.4s var(--ease-out-expo);
}

.contact-link-item:hover {
    padding-left: 8px;
    padding-right: 8px;
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.contact-link-value {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 450;
}

.contact-link-arrow {
    font-size: 18px;
    color: var(--text-tertiary);
    transition: all 0.4s var(--ease-out-expo);
    transform: rotate(-45deg);
}

.contact-link-item:hover .contact-link-arrow {
    color: var(--text);
    transform: rotate(0deg) translateX(4px);
}

/* ── Footer ── */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer p {
    font-size: 13px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }

/* ── Line Reveal ── */
.line-reveal {
    position: relative;
    overflow: hidden;
}

.line-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s var(--ease-out-expo);
}

.line-reveal.visible::after {
    transform: scaleX(1);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 24px 60px;
    }

    .hero-name {
        font-size: clamp(2.8rem, 11vw, 4.2rem);
    }

    .section {
        padding: 80px 0;
    }

    .container {
        padding: 0 24px;
    }

    .nav-inner {
        padding: 0 24px;
    }

    .about-grid,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .project-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 32px 24px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 4px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-column {
        padding: 24px 20px;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hero-meta .dot {
        display: none;
    }

    .hero-links {
        flex-direction: column;
        gap: 16px;
    }
}