:root {
    --bg: #000000;
    --fg: #ffffff;
    --gray: #888888;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --font-head: 'Space Grotesk', sans-serif;
    --font-thai: 'Kanit', sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-thai);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* 🌫️ Noise Overlay */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04; pointer-events: none; z-index: 2000; /* อยู่บนสุดเสมอ */
}

/* ⚪ Floating Parallax Circles Background */
.parallax-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; /* อยู่หลังเนื้อหา */
    pointer-events: none;
}
.circle {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.circle-1 { width: 30vw; height: 30vw; top: 20%; left: -10%; }
.circle-2 { width: 15vw; height: 15vw; top: 60%; right: 10%; background: var(--glass); }
.circle-3 { width: 50vw; height: 50vw; bottom: -20%; left: 30%; }

/* 📊 Progress */
.progress-container {
    position: fixed; top: 0; width: 100%; height: 2px; z-index: 1500;
}
.progress-bar { height: 100%; background: var(--fg); width: 0%; transition: 0.1s; }

/* 🧭 Nav */
nav {
    position: fixed; width: 100%; padding: 25px 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-content {
    max-width: 1400px; margin: 0 auto; padding: 0 5vw;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-family: 'Syncopate', sans-serif; font-weight: 700; font-size: 1.2rem; }
.logo .year { color: var(--gray); font-family: var(--font-head); font-weight: 300; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--fg); font-size: 0.9rem; font-weight: 400; transition: 0.3s; }
.nav-links a:hover { color: var(--gray); }
.nav-cta { border: 1px solid var(--fg); padding: 8px 18px; border-radius: 50px; }

/* 🎬 Hero */
.hero {
    height: 100vh; display: flex; align-items: center; padding-top: 100px;
}
.hero-sub { font-size: 0.8rem; letter-spacing: 5px; color: var(--gray); margin-bottom: 15px; display: block; }
.hero-title {
    font-size: clamp(3rem, 12vw, 9rem); line-height: 0.9;
    font-weight: 700; letter-spacing: -4px; font-family: var(--font-head);
}
.outline { color: transparent; -webkit-text-stroke: 1px var(--fg); }
.hero-bottom {
    margin-top: 50px; display: flex; justify-content: space-between; align-items: flex-end;
}
.location { color: var(--gray); font-size: 0.9rem; }
.hero-desc { max-width: 300px; color: var(--gray); text-align: right; font-weight: 300; }

/* 📖 Content Section */
.main-content { padding: 100px 0; }
.grid-section {
    display: grid; grid-template-columns: 250px 1fr;
    padding: 120px 0; border-bottom: 1px solid var(--border);
}
.section-label { font-size: 0.8rem; color: var(--gray); font-family: var(--font-head); letter-spacing: 1px; }
.large-p {
    font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.2;
    font-weight: 500; color: var(--gray); margin-bottom: 40px;
}
.highlight { color: var(--fg); position: relative; }
.highlight::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
    background: var(--fg); transform: scaleX(0); transition: 0.5s; transform-origin: right;
}
.highlight:hover::after { transform: scaleX(1); transform-origin: left; }
.base-p { max-width: 600px; color: var(--gray); font-size: 1.1rem; font-weight: 300; }

/* 🏐 Skills */
.skill-item {
    display: flex; gap: 40px; align-items: center;
    background: rgba(255,255,255,0.01); padding: 50px; border: 1px solid var(--border);
}
.skill-icon { font-size: 2.5rem; }
.skill-text h3 { font-size: 1.8rem; font-weight: 600; margin-bottom: 8px; }

/* 📱 Footer */
footer { padding: 150px 0 80px; background: rgba(255,255,255,0.01); }
.footer-head {
    font-size: clamp(3rem, 10vw, 8rem); font-family: var(--font-head);
    line-height: 0.9; letter-spacing: -3px; margin-bottom: 60px;
}
.footer-meta {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; color: var(--gray); font-family: var(--font-head);
}

/* 📜 Reveal Animation */
.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.2s; }

/* Mobile */
@media (max-width: 768px) {
    .nav-links { display: none; } /* คลีนสุดบนมือถือ */
    .grid-section { grid-template-columns: 1fr; gap: 30px; padding: 80px 0; }
    .hero-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
    .hero-desc { text-align: left; max-width: 100%; }
}
