/* ============================================
   VARIABLES
   ============================================ */
:root {
  --bg: #050505;
  --fg: #e8e8e8;
  --fg-muted: #888;
  --fg-dim: #555;
  --accent: #00e86e;
  --accent-dim: rgba(0, 232, 110, 0.15);
  --accent-glow: rgba(0, 232, 110, 0.08);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --header-height: 60px;
  --section-padding: clamp(80px, 12vh, 160px);
  --content-width: 1100px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--fg-dim) transparent;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ============================================
   FLUID CANVAS
   ============================================ */
#fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   CURSOR GLOW
   ============================================ */
#cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    var(--accent-glow) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

body:hover #cursor-glow {
  opacity: 1;
}

/* ============================================
   HEADER
   ============================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 5, 5, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.25s ease;
  position: relative;
}

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

nav a:hover {
  color: var(--fg);
}

nav a:hover::after {
  width: 100%;
}

/* ============================================
   SECTIONS — COMMON
   ============================================ */
section {
  position: relative;
  z-index: 2;
  padding: var(--section-padding) var(--gutter);
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(40px, 6vh, 80px);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-title::after {
  content: '';
  display: inline-block;
  width: clamp(60px, 20vw, 300px);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  vertical-align: middle;
  margin-left: 20px;
}

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-height);
}

.hero-content {
  max-width: 720px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero-title .line {
  display: block;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: var(--fg-muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--fg-dim), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-large {
  padding: 18px 40px;
  font-size: 14px;
}

/* ============================================
   ABOUT
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 3fr 2fr;
    gap: 64px;
  }
}

.about-text p.large {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--fg);
}

.about-text p {
  color: var(--fg-muted);
  line-height: 1.7;
}

.detail-group h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.tag-list li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   WORK / PROJECTS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.project-card {
  position: relative;
  display: block;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.35s ease;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-dim),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  border-color: rgba(0, 232, 110, 0.2);
  transform: translateY(-2px);
}

.project-card-inner {
  position: relative;
  z-index: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-label,
.project-year {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.project-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  transition: color 0.25s ease;
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

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

.project-tech span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

/* ============================================
   EXPERIENCE
   ============================================ */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease;
}

@media (min-width: 768px) {
  .experience-item {
    grid-template-columns: 200px 1fr;
    gap: 40px;
  }
}

.experience-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.experience-period span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}

.experience-details h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.experience-details .company {
  color: var(--accent);
  font-weight: 400;
}

.experience-details p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.experience-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.experience-tech span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  padding: 3px 10px;
  background: var(--accent-dim);
  border-radius: 3px;
}

/* ============================================
   CONTACT
   ============================================ */
#contact {
  text-align: center;
  padding-top: clamp(100px, 15vh, 200px);
  padding-bottom: clamp(100px, 15vh, 200px);
}

.contact-content {
  max-width: 560px;
  margin: 0 auto;
}

.contact-title {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 20px 0 24px;
}

.contact-text {
  color: var(--fg-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.25s ease;
}

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

/* ============================================
   FOOTER
   ============================================ */
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  nav {
    gap: 20px;
  }

  nav a {
    font-size: 11px;
  }

  .hero-title {
    font-size: clamp(44px, 14vw, 72px);
  }

  .footer-content {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .contact-links {
    flex-direction: column;
    gap: 16px;
  }
}
