/* -------------------------------------------------------------
 * Swiss Editorial Styling System
 * Inspired by Swiss Typographic Design (Bauhaus, Le Corbusier)
 * ------------------------------------------------------------- */

:root {
    /* Stark Light Theme (Default) */
    --bg-primary: #FAF9F6;      /* Off-white editorial paper */
    --text-primary: #0F0F10;    /* Ink black */
    --text-secondary: #4A4A4F;  /* Dark zinc gray */
    --text-muted: #8A8A8F;     /* Muted gray */
    --accent: #E11D48;         /* Bold Swiss Crimson */
    --accent-rgb: 225, 29, 72;
    --border: #0F0F10;          /* Crisp solid black borders */
    --border-subtle: rgba(15, 15, 16, 0.08);
    --btn-hover-bg: #1F1F22;
    
    /* Font Stack */
    --font-display: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --container-width: 1280px;
}

/* Stark Dark Theme Class */
body.dark-theme {
    --bg-primary: #0B0B0C;      /* Ink-black canvas */
    --text-primary: #F4F4F6;    /* Off-white type */
    --text-secondary: #A1A1A8;  /* Light zinc gray */
    --text-muted: #5F5F65;     /* Dark muted gray */
    --accent: #FB7185;         /* Vibrant Rose Crimson */
    --accent-rgb: 251, 113, 133;
    --border: #F4F4F6;          /* Crisp solid white borders */
    --border-subtle: rgba(244, 244, 246, 0.12);
    --btn-hover-bg: #E4E4E7;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                color 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Helper Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.font-mono {
    font-family: var(--font-mono);
}

.font-display {
    font-family: var(--font-display);
}

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

/* Sticky Header / Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.4s, border-color 0.4s;
}

body.dark-theme .navbar {
    background-color: rgba(11, 11, 12, 0.85);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-num {
    color: var(--accent);
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--text-primary);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, color 0.2s;
}

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

.toggle-status {
    color: var(--accent);
}

/* Core Asymmetric Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: start;
}

.grid-left {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.section-name {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    max-width: 900px;
}

.section {
    padding: 120px 0;
}

/* Hero Section */
.hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 80px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: start;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 8.2vw, 6.2rem);
    line-height: 0.85;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-transform: uppercase;
    /* Custom stretch transition hook */
    transition: transform 0.1s ease-out;
    transform-origin: left center;
}

.hero-info-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
}

.hero-tag {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 700;
}

.hero-description {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 24px 0 40px 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* Metrics Table */
.hero-metrics-table {
    border-top: 1px solid var(--border);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.metric-row:last-child {
    border-bottom: 1px solid var(--border);
}

.metric-label {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

/* About Section Table styling */
.about-content {
    max-width: 760px;
    margin-bottom: 64px;
}

.about-content p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.highlights-table {
    border-top: 1px solid var(--border);
}

.hl-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 32px;
}

.hl-row:last-child {
    border-bottom: 1px solid var(--border);
}

.hl-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hl-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tech Stack Section Rows */
.stack-list {
    border-top: 1px solid var(--border);
}

.stack-item-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 32px;
    align-items: baseline;
    transition: background-color 0.2s ease;
}

.stack-item-row:hover {
    background-color: var(--border-subtle);
    padding-left: 12px;
}

.stack-item-row:last-child {
    border-bottom: 1px solid var(--border);
}

.stack-category {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.stack-values {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* Impact Section Timeline / Table */
.impact-table {
    border-top: 1px solid var(--border);
}

.impact-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 32px;
    transition: background-color 0.2s ease;
}

.impact-row:hover {
    background-color: var(--border-subtle);
    padding-left: 12px;
}

.impact-row:last-child {
    border-bottom: 1px solid var(--border);
}

.impact-meta {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.impact-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.impact-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 720px;
}

/* Experience Section */
.experience-timeline {
    border-top: 1px solid var(--border);
}

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

.exp-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.exp-company {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.exp-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.exp-role {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.exp-summary {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 24px;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-tags span {
    border: 1px solid var(--text-muted);
    color: var(--text-secondary);
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Projects Section Showcase */
.project-showcase {
    border-top: 1px solid var(--border);
}

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

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.project-name {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.project-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.project-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 24px;
}

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

.project-tags span {
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Contact Box / Formats */
.contact-box {
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.contact-text {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 800px;
}

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

.contact-link-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    padding: 28px 0;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}

.contact-link-row:last-child {
    border-bottom: 1px solid var(--border);
}

.contact-label {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.contact-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    width: fit-content;
}

.contact-socials {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.contact-socials a {
    color: var(--text-primary);
    text-decoration: none;
}

/* Underline Reveal Effect */
.underline-reveal {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    padding-bottom: 2px;
    transition: background-size 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.underline-reveal:hover {
    background-size: 100% 2px;
}

/* Footer styling */
.footer {
    padding: 60px 0;
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Dynamic Typography Reveals & Micro-animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-title {
        font-size: clamp(3rem, 10vw, 5.5rem);
    }
    
    .hero-info-col {
        padding-top: 0;
    }
}

@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .grid-left {
        position: static;
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        margin-bottom: 32px;
    }
    
    .hl-row, .stack-item-row, .impact-row, .contact-link-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 24px 0;
    }
    
    .stack-item-row:hover, .impact-row:hover {
        padding-left: 0;
    }
    
    .nav-links a {
        display: none; /* Mobile menu can be simplified or hidden for sheer minimalism */
    }
    
    /* Show only theme toggle on mobile */
    .nav-links .theme-toggle-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-primary, .btn-secondary {
        text-align: center;
        width: 100%;
    }
    
    .exp-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 8px;
    }
}
