/* High-End Industrial Minimalist Design System */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400&display=swap');

:root {
    --bg-color: #050505;
    --text-primary: #ededed;
    --text-secondary: #888888;
    --accent: #ccff00;
    /* Neon Lime for tiny accents */
    --accent-dim: rgba(204, 255, 0, 0.1);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 1400px;
    --spacing-layout: 2rem;

    --grid-gap: 20px;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(20, 20, 20, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom one */
}

html {
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

body {
    font-family: var(--font-heading);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a, button, .bento-item {
    touch-action: manipulation;
}

/* --- Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-layout);
}

.section {
    padding: 10rem 0;
}

.full-height {
    min-height: 100vh;
}

::-moz-selection {
    background: var(--accent);
    color: var(--bg-color);
}

::selection {
    background: var(--accent);
    color: var(--bg-color);
}

/* --- Background Effects --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

/* Hover state for cursor */
body.hovering .cursor-circle {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    backdrop-filter: blur(2px);
}

/* --- Typography --- */
h1 {
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(2rem, 6vw, 5rem);
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.outline-text {
    -webkit-text-stroke: 1px var(--text-secondary);
    color: transparent;
    transition: color 0.5s ease;
}

.outline-text:hover {
    color: var(--text-primary);
}

.meta-tag,
.tag,
.exp-year,
.section-number,
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.highlight {
    color: var(--accent);
}

.tag-private {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.5;
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
}

/* --- Navigation --- */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    mix-blend-mode: difference;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.nav-links a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
}

/* --- Hero Section --- */
#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10vh;
}

.meta-tag {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-desc {
    max-width: 400px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Button */
.btn-primary {
    padding: 1rem 2rem;
    background: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: 600;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-5px);
}

/* --- Section Formatting --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 350px;
    gap: var(--grid-gap);
}

.bento-item {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: border-color 0.3s ease;
    text-decoration: none;
    /* For when it becomes an <a> tag */
    color: inherit;
    /* For when it becomes an <a> tag */
    cursor: none;
    /* Maintain custom cursor */
}

.bento-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.bento-item.large {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

.bento-item:hover .bento-bg {
    opacity: 0.4;
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-content.centered {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.bento-header h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-right: 1rem;
    opacity: 0.6;
}

.arrow-link {
    font-size: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.bento-item:hover .arrow-link {
    transform: translate(5px, -5px);
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

/* --- Backstory Lede --- */
.backstory-lede {
    max-width: 720px;
    margin: 0 0 6rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.backstory-lede p {
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    line-height: 1.6;
    color: var(--text-muted, #b0b0b0);
    letter-spacing: -0.005em;
}

.backstory-lede p:first-child {
    color: var(--text-color, #f5f5f5);
}

@media (max-width: 768px) {
    .backstory-lede {
        margin: 0 0 3rem 0;
    }
}

/* --- Experience Feed --- */
.experience-feed {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.exp-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    transition: padding 0.3s ease;
}

.exp-row:hover {
    padding-left: 2rem;
    /* Subtle shift */
}

.exp-details h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.exp-company {
    display: block;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.footer-content h2 {
    font-size: clamp(3rem, 5vw, 6rem);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.email-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 5px;
    font-family: var(--font-mono);
}

.footer-meta {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Responsive --- */

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    * {
        cursor: auto !important;
    }

    .cursor-dot,
    .cursor-circle {
        display: none !important;
    }
}

/* Tablet & Small Desktop */
@media (max-width: 1024px) {
    :root {
        --spacing-layout: 1.5rem;
        --container-width: 100%;
    }

    .section {
        padding: 6rem 0;
    }

    h1 {
        font-size: clamp(3rem, 10vw, 7rem);
    }

    h2 {
        font-size: clamp(1.8rem, 5vw, 3.5rem);
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
    }

    .bento-item {
        min-height: 280px;
        padding: 1.5rem;
    }

    .bento-item.large,
    .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-header h3 {
        font-size: 1.8rem;
    }

    .hero-footer {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 2rem;
    }

    .hero-desc {
        max-width: 100%;
        font-size: 1rem;
    }

    .exp-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding-top: 1.5rem;
    }

    .exp-row:hover {
        padding-left: 0;
    }

    .exp-details h3 {
        font-size: 1.5rem;
    }

    .experience-feed {
        gap: 2.5rem;
    }

    .backstory-lede {
        margin: 0 0 4rem 0;
        max-width: 100%;
    }

    .backstory-lede p {
        font-size: 1rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
        padding-bottom: 1.5rem;
    }

    /* Nav */
    .fixed-nav {
        padding: 1.25rem 0;
    }

    .nav-links a {
        margin-left: 1.25rem;
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        min-height: 60vh;
    }

    .footer-content h2 {
        font-size: clamp(2rem, 5vw, 4rem);
    }

    .email-link {
        font-size: 1.1rem;
    }

    .footer-meta {
        margin-top: 3rem;
        padding: 1.5rem 0;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Mobile Phones */
@media (max-width: 768px) {
    :root {
        --spacing-layout: 1rem;
    }

    .section {
        padding: 4rem 0;
    }

    h1 {
        font-size: clamp(2.4rem, 12vw, 4rem);
    }

    h2 {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
    }

    /* Nav */
    .fixed-nav {
        padding: 1rem 0;
        background: rgba(5, 5, 5, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .nav-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        display: flex;
        gap: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 1rem;
        font-size: 0.75rem;
    }

    /* Hero */
    #hero {
        padding-top: 6rem;
        min-height: 90vh;
    }

    .meta-tag {
        font-size: 0.7rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .hero-footer {
        margin-top: 1.5rem;
        gap: 1.5rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 0.85rem 1.5rem;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    /* Bento */
    .bento-grid {
        gap: 10px;
    }

    .bento-item {
        min-height: 240px;
        padding: 1.25rem;
    }

    .bento-header h3 {
        font-size: 1.5rem;
    }

    .bento-item p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .tech-stack span {
        font-size: 0.7rem;
        margin-right: 0.5rem;
    }

    .tag {
        font-size: 0.7rem;
    }

    .tag-private {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    /* Backstory */
    .backstory-lede {
        margin-bottom: 3rem;
        gap: 1rem;
    }

    .backstory-lede p {
        font-size: 0.9rem;
    }

    /* Experience */
    .experience-feed {
        gap: 2rem;
    }

    .exp-row {
        padding-top: 1.25rem;
    }

    .exp-details h3 {
        font-size: 1.25rem;
    }

    .exp-year {
        font-size: 0.7rem;
    }

    .exp-details p {
        font-size: 0.85rem;
    }

    /* Footer */
    footer {
        min-height: 50vh;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-content h2 {
        font-size: clamp(1.8rem, 6vw, 3rem);
        margin-bottom: 1.5rem;
    }

    .email-link {
        font-size: 0.9rem;
        display: block;
    }

    .footer-meta {
        margin-top: 2rem;
        padding: 1rem 0;
        gap: 0.35rem;
        font-size: 0.7rem;
    }

    /* Section header */
    .section-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-number {
        font-size: 0.7rem;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    h1 {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    h2 {
        font-size: clamp(1.4rem, 7vw, 2rem);
    }

    .section {
        padding: 3rem 0;
    }

    .bento-item {
        min-height: 200px;
        padding: 1rem;
    }

    .bento-header h3 {
        font-size: 1.25rem;
    }

    .bento-item p {
        font-size: 0.8rem;
    }

    .exp-details h3 {
        font-size: 1.1rem;
    }

    .exp-details p {
        font-size: 0.8rem;
    }

    .hero-desc {
        font-size: 0.85rem;
    }

    /* Nav */
    .nav-links a {
        margin-right: 0.75rem;
        font-size: 0.7rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Footer */
    .email-link {
        font-size: 0.8rem;
    }

    .footer-content h2 {
        font-size: 1.6rem;
    }
}

/* --- Utils for JS --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}