:root {
    --bg: #FDFCFB;
    --surface: #FFFFFF;
    --text-main: #111111;
    --text-sec: #666666;
    --accent: #1A73E8;
    --accent-green: #1E8E3E;
    --line: #EAEAEA;
    --font-display: 'Inter Tight', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease: cubic-bezier(0.2, 0, 0.2, 1);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.03);
    --shadow-md: 0 12px 40px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    /* FIX: Ensure sticky works by preventing overflow clipping on body */
    overflow-x: clip; 
    width: 100%;
}

/* --- TEXTURES & BACKGROUNDS --- */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: -1;
}

.aurora-bg {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(26, 115, 232, 0.08) 0%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(circle at 80% 30%, rgba(52, 168, 83, 0.05) 0%, rgba(255, 255, 255, 0) 40%);
    z-index: -2; animation: rotate 30s linear infinite; pointer-events: none;
}
@keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- NAVIGATION --- */
.nav-island {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 10px 24px; border-radius: 100px; display: flex; align-items: center; gap: 32px;
    border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-sm); z-index: 100;
}
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-main); text-decoration: none; }
.dot { color: var(--accent); }
.nav-items { display: flex; gap: 24px; }
.nav-link { text-decoration: none; color: var(--text-sec); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text-main); }

.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: transparent; border: none; cursor: pointer; color: var(--text-main); display: flex; align-items: center; opacity: 0.6; transition: opacity 0.2s; padding: 4px; }
.icon-btn:hover { opacity: 1; }

/* --- HERO --- */
.main-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero-section { min-height: 90vh; display: flex; align-items: center; padding-top: 80px; }
.status-pill {
    display: inline-flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--line);
    padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; color: var(--text-sec); margin-bottom: 32px;
}
.pulsing-dot { width: 6px; height: 6px; background: #34A853; border-radius: 50%; box-shadow: 0 0 0 2px rgba(52, 168, 83, 0.2); }
.hero-title {
    font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 24px;
}
.line-wrap { display: block; overflow: hidden; }
.reveal-text { display: inline-block; transform: translateY(100%); opacity: 0; transition: transform 1s var(--ease), opacity 1s ease; }
.highlight { color: var(--text-sec); }
.hero-sub { font-size: 1.25rem; color: var(--text-sec); max-width: 500px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; align-items: center; }
.btn {
    height: 52px; padding: 0 28px; border-radius: 100px; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--text-main); color: white; border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.btn-text { background: transparent; color: var(--text-main); border: 1px solid var(--line); }
.btn-text:hover { background: white; border-color: #ccc; }

/* --- SECTIONS --- */
.section-padding { padding: 120px 0; }
.section-title { font-family: var(--font-display); font-size: 2rem; margin-bottom: 40px; }

/* --- WORK GRID --- */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.project-card { display: block; text-decoration: none; color: inherit; position: relative; }
.project-card.large { grid-column: span 2; }

.card-visual {
    width: 100%; aspect-ratio: 16/10; background: #F0F0F0; border-radius: 24px;
    overflow: hidden; margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.05);
    position: relative; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.hover-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3);
    color: white; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; font-weight: 600;
}
.project-card:hover .card-visual { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.project-card:hover .card-visual img { transform: scale(1.05); }
.project-card:hover .hover-overlay { opacity: 1; }

.card-meta h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 8px; }
.card-meta p { color: var(--text-sec); margin-bottom: 16px; font-size: 1.05rem; }
.tags { display: flex; gap: 8px; margin-bottom: 12px; }
.tag { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-sec); letter-spacing: 0.05em; }
.read-more { font-weight: 600; color: var(--accent); font-size: 0.9rem; }

/* --- EXPERTISE --- */
.skills-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; 
    padding: 60px 40px; background: white; border-radius: 24px; border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm);
}
.skill-head { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 24px; color: var(--text-main); }
.skill-list { list-style: none; }
.skill-list li { margin-bottom: 12px; color: var(--text-sec); font-size: 1rem; padding-left: 16px; position: relative; }
.skill-list li::before { content: "•"; color: var(--accent); position: absolute; left: 0; font-weight: bold; }

/* --- PHILOSOPHY --- */
.philosophy-section { padding: 140px 0; text-align: center; max-width: 900px; margin: 0 auto; }
.philosophy-quote { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.2; font-weight: 500; }
.highlight-blue { color: var(--accent); font-weight: 600; }

/* --- TIMELINE --- */
.timeline-wrapper { border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 180px 1fr 1.5fr; padding: 40px 0; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.timeline-row:hover { background: rgba(255,255,255,0.5); }
.t-date { font-weight: 600; color: var(--text-sec); }
.t-role h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.t-company { color: var(--text-sec); font-size: 0.95rem; }
.t-desc { color: var(--text-sec); line-height: 1.6; }

/* --- PROJECT PAGE LAYOUT --- */
.container-narrow { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.project-hero { padding: 140px 0 60px; text-align: center; }
.pill-label { display: inline-block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 600; background: rgba(26, 115, 232, 0.1); padding: 4px 12px; border-radius: 20px; margin-bottom: 24px; }
.project-title { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 16px; }
.project-lead { font-size: 1.25rem; color: var(--text-sec); max-width: 700px; margin: 0 auto 60px; line-height: 1.5; }
.hero-visual { width: 100%; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); }
.hero-visual img { width: 100%; display: block; }

.project-layout { display: grid; grid-template-columns: 260px 1fr; gap: 80px; margin-top: 80px; padding-bottom: 100px; position: relative; }
.sidebar-inner { position: sticky; top: 120px; } 

.sidebar-divider { margin: 30px 0; border: none; border-top: 1px solid var(--line); }
.toc-link { display: block; color: var(--text-sec); text-decoration: none; margin-bottom: 12px; font-size: 0.95rem; transition: color 0.2s; }
.toc-link:hover, .toc-link.active { color: var(--accent); font-weight: 500; }

.content-block { margin-bottom: 80px; }
.content-block h3 { font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 20px; color: var(--text-main); }
.content-block p { font-size: 1.15rem; color: #333; margin-bottom: 24px; line-height: 1.7; max-width: 700px; }

.insight-box { background: #F0F4FF; border-left: 4px solid var(--accent); padding: 24px; border-radius: 0 12px 12px 0; font-size: 1.1rem; color: #333; margin: 32px 0; }
.image-row figure, .image-full { margin: 40px 0; }
.image-row img, .image-full img { width: 100%; border-radius: 12px; box-shadow: var(--shadow-sm); }
figcaption { text-align: center; font-size: 0.85rem; color: var(--text-sec); margin-top: 12px; font-style: italic; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.stat-card { background: white; padding: 32px 24px; border-radius: 16px; border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow-sm); }
.stat-card .num { display: block; font-size: 2.5rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 8px; }

.project-footer { text-align: center; padding: 100px 0; border-top: 1px solid var(--line); background: white; }
.next-label { display: block; font-size: 0.8rem; text-transform: uppercase; color: var(--text-sec); margin-bottom: 12px; letter-spacing: 0.05em; }
.next-link { font-size: 2rem; font-family: var(--font-display); font-weight: 600; color: var(--text-main); text-decoration: none; }
.next-link:hover { color: var(--accent); }

/* --- FOOTER --- */
.site-footer { background: white; padding: 80px 24px 40px; text-align: center; border-top: 1px solid var(--line); }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 40px; }
.footer-links a { color: var(--text-sec); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text-main); }
.copyright { color: #aaa; font-size: 0.9rem; }

/* --- TOAST --- */
.toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #111; color: white; padding: 12px 24px; border-radius: 50px;
    display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 200;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0%; z-index: 1000; transition: width 0.1s; }

/* --- ANIMATION --- */
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease); }
.fade-down { opacity: 0; transform: translateY(-30px) translateX(-50%); transition: all 0.8s var(--ease); }
.visible { opacity: 1; transform: translate(0); }
.nav-island.visible { transform: translateX(-50%); opacity: 1; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .skills-grid { grid-template-columns: 1fr; gap: 30px; }
    .timeline-row { grid-template-columns: 1fr; gap: 8px; }
    .t-date { margin-bottom: 4px; } .t-desc { margin-top: 12px; }
    .project-layout { grid-template-columns: 1fr; }
    .project-sidebar { position: static; margin-bottom: 60px; border-bottom: 1px solid var(--line); padding-bottom: 40px; }
    .sidebar-inner { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .toc { display: none; }
    .sidebar-divider { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-items { display: none; }
    .hero-title { font-size: 3rem; }
    .work-grid { grid-template-columns: 1fr; }
    .project-card.large { grid-column: span 1; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
}
