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

:root {
  --bg:           #0A0A0A;
  --surface:      #141414;
  --surface-2:    #1C1C1C;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text:         #FFFFFF;
  --text-muted:   rgba(255, 255, 255, 0.45);
  --text-subtle:  rgba(255, 255, 255, 0.22);
  --accent:       #C2FF4F;
  --accent-bg:    rgba(194, 255, 79, 0.08);
  --accent-border:rgba(194, 255, 79, 0.2);
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;
  --max-w:        1200px;
  --nav-h:        72px;
  --font-head:    'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* =============================================
   FADE-IN ANIMATION
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.8);
}

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

.nav-logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.nav-links a, .nav-back {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-back:hover { color: var(--text); }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 120px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at 70% 50%, rgba(194,255,79,0.05) 0%, transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(56px, 7.5vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 18px;
}

.hero-role {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-bio {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-plus { color: var(--accent); }

.stat-label {
  font-size: 11px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  flex-shrink: 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: var(--text);
  color: var(--bg);
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.btn-large {
  font-size: 16px;
  padding: 16px 32px;
}

.btn-ghost {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

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

/* =============================================
   HERO IMAGE
   ============================================= */
.hero-image {
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 5%;
  right: 5%;
  height: 140px;
  background: var(--accent);
  filter: blur(90px);
  opacity: 0.18;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* =============================================
   SECTIONS COMMON
   ============================================= */
section { padding: 100px 0; }

.section-header { margin-bottom: 56px; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.work { border-top: 1px solid var(--border); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
}

.project-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.project-card:hover .project-img img { transform: scale(1.04); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

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

.project-info { padding: 22px 24px 26px; }

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

.project-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.project-year {
  font-size: 12px;
  color: var(--text-subtle);
  flex-shrink: 0;
}

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

.project-tags span {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
}

/* =============================================
   EXPERIENCE
   ============================================= */
.experience { border-top: 1px solid var(--border); }

.exp-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-period {
  font-size: 13px;
  color: var(--text-subtle);
  padding-top: 5px;
  font-weight: 400;
  line-height: 1.5;
}

.exp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.exp-role {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.exp-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 3px 12px;
  border-radius: 100px;
  transition: background 0.2s;
}

.exp-company:hover { background: var(--accent-bg); }

.exp-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
}

/* =============================================
   TOOLS MARQUEE
   ============================================= */
.tools-section {
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 0%, rgba(194,255,79,0.04) 0%, transparent 55%);
}

.marquee-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.marquee-wrapper {
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* gap: 0 — seamless loop relies on margin-right on each chip */
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee-ltr 42s linear infinite;
}

.marquee-rtl {
  animation: marquee-rtl 38s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* 3 identical copies → translate by exactly 1/3 of total width */
@keyframes marquee-ltr {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

@keyframes marquee-rtl {
  from { transform: translateX(-33.333%); }
  to   { transform: translateX(0); }
}

.tool-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 14px; /* replaces gap — required for seamless -33.333% loop */
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  cursor: pointer;
  text-decoration: none;
}

.tool-chip:hover {
  border-color: rgba(194, 255, 79, 0.35);
  background: var(--surface-2);
  box-shadow: 0 0 24px rgba(194, 255, 79, 0.07);
}

.tool-chip img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.tool-chip .chip-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.8;
}

.tool-chip svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: white;
  opacity: 0.8;
}

.tool-chip span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* =============================================
   EXPERIENCE TOGGLE
   ============================================= */
.exp-extra { display: none; }

.exp-more-wrap {
  padding-top: 32px;
  display: flex;
  justify-content: center;
}

.exp-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 12px 28px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.exp-toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface);
}

/* =============================================
   CONTACT
   ============================================= */
.contact-section { border-top: 1px solid var(--border); }

.contact-inner { max-width: 720px; }

.contact-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin: 12px 0 20px;
}

.contact-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.form-input::placeholder {
  color: var(--text-subtle);
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-submit {
  align-self: flex-start;
  cursor: pointer;
  border: none;
}

/* Success state */
.form-success {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  color: var(--accent);
}

.form-success svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  stroke: var(--accent);
}

.form-success p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .form-submit { align-self: stretch; text-align: center; }
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-name {
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

/* =============================================
   PROJECT PAGES
   ============================================= */
.project-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
}

.project-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.project-hero-year {
  font-size: 13px;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
}

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

.project-hero-tags span {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
}

.project-hero-title {
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 16px;
}

.project-hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 400;
}

.project-hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.75;
}

.project-gallery { padding: 60px 0 80px; }

.gallery-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.gallery-stack img {
  width: 100%;
  display: block;
}

.gallery-stack--light img {
  background: #ffffff;
}

/* Figma prototype embed */
.figma-embed {
  width: 100%;
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

.figma-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.project-nav-section {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-image { order: -1; }

  .hero-image img {
    height: 420px;
    object-position: center 20%;
  }

  .projects-grid { grid-template-columns: 1fr 1fr; }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }

  .hero {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 80px;
  }

  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 30px; }
  .nav-links { gap: 18px; }

  .project-nav-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
