/* Minimalist Scientific Portfolio — Light Mode (Monochrome)
   With functional improvements: hamburger menu, toast, scroll reveal, skill pills */

:root {
    /* Pure White & Black */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F8F8;
    --bg-tertiary: #EFEFEF;

    /* Typography Colors */
    --text-primary: #000000;
    --text-secondary: #444444;
    --text-muted: #666666;

    /* Scientific Contrast */
    --accent-primary: #000000;
    --accent-secondary: #333333;

    /* Structural Lines */
    --border-color: #E5E5E5;
    --border-hover: #000000;
    --grid-color: rgba(0, 0, 0, 0.03);

    /* Typography — Computer Modern (LaTeX) */
    --font-heading: 'Computer Modern Serif', 'Outfit', serif;
    --font-body: 'Computer Modern Sans', 'Inter', sans-serif;

    /* Layout */
    --container-width: 1200px;
    --radius: 0px;
    /* Sharp edges for minimalism */
    --transition: 0.2s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Subtle Grid Background */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utility Components */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.section {
    padding: 8rem 0;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-subtitle {
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 1rem;
    display: block;
}

/* ── Scroll Reveal ───────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Buttons - Minimalist */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--text-primary);
    border-radius: 0px;
    /* Sharp */
    font-weight: 500;
    font-family: var(--font-heading);
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

/* Navigation - Floating */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 4px;
}

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

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

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

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 2rem;
}

.hero-intro {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    justify-content: center;
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-weight: 300;
}

.stat-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

/* Projects - Monolith Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    transition: var(--transition);
    border-radius: 0px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
}

.project-icon {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    display: block;
}

.project-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-card .project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.tag {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    background: transparent;
    text-transform: uppercase;
}

.tag.tag-ai {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    font-weight: 500;
}

.project-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    align-self: flex-start;
}

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

/* Timeline - Scientific Log */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 1px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 8px;
    width: 13px;
    height: 13px;
    background: var(--bg-primary);
    border: 1px solid var(--text-primary);
    border-radius: 50%;
}

.active-dot .timeline-dot {
    background: var(--text-primary);
}

.timeline-date {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: transparent;
    border: none;
    padding: 0;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.timeline-content .role {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 1rem;
    font-style: italic;
    display: block;
}

.timeline-content ul li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.timeline-content ul li::before {
    content: none;
}

/* Skills - Taxonomy */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3rem;
}

.skill-group h4 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.skill-pill {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 0;
    transition: var(--transition);
    cursor: default;
}

.skill-pill:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Footer */
.footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.85rem 1.8rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-family: var(--font-body);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        border-left: 1px solid var(--border-color);
    }

    .nav-links.open {
        right: 0;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        border-top: none;
    }

    .section {
        padding: 5rem 0;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-dot {
        left: -6px;
    }

    .project-card {
        padding: 1.5rem;
    }

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