/* ===== Design tokens ===== */
:root {
  --bg: #09090b;
  --bg-elevated: #111113;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --violet: #a78bfa;
  --gradient: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Syne', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* ===== Mesh background ===== */
.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}

.mesh-blob-1 {
  width: 520px;
  height: 520px;
  background: #22d3ee;
  top: -12%;
  left: -8%;
  opacity: 0.18;
}

.mesh-blob-2 {
  width: 420px;
  height: 420px;
  background: #a78bfa;
  top: 35%;
  right: -10%;
  opacity: 0.14;
  animation-delay: -6s;
}

.mesh-blob-3 {
  width: 360px;
  height: 360px;
  background: #22d3ee;
  bottom: -8%;
  left: 30%;
  opacity: 0.1;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(9, 9, 11, 0.88);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  color: var(--accent);
  font-size: 1.15rem;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--surface);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s var(--ease);
}

.menu-toggle.active span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.active span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 80px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.1); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-title-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.925rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

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

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

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

.btn-block {
  width: 100%;
}

/* Hero side cards */
.hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

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

.hero-card-1 {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.05));
  border-color: rgba(34, 211, 238, 0.15);
}

.hero-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hero-card-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-card-1 .hero-card-value {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-card-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hero-stack span {
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 110px 0;
}

.section-tight {
  padding: 80px 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-title-sm {
  margin-bottom: 40px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 12px;
}

.about-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 20px;
  max-width: 480px;
}

.about-meta {
  display: flex;
  gap: 40px;
  margin-top: 36px;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.meta-value {
  font-weight: 600;
  font-size: 0.95rem;
}

.about-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s, background 0.3s;
}

.bento-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.bento-large {
  grid-column: 1 / -1;
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.06), transparent 60%);
}

.bento-icon {
  display: block;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.bento-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.bento-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Skills ===== */
.skills-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s;
}

.skill-group:hover {
  border-color: var(--border-hover);
}

.skill-group h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

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

.chip-strong {
  background: var(--accent-soft);
  border-color: rgba(34, 211, 238, 0.2);
  color: var(--accent);
}

.chip-strong:hover {
  background: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
}

/* ===== Work ===== */
.work-header {
  margin-bottom: 48px;
}

.work-desc {
  margin-top: 14px;
  color: var(--text-secondary);
  max-width: 420px;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s;
}

.work-item:hover {
  border-color: rgba(34, 211, 238, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.work-visual {
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.06));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
}

.work-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.work-icon {
  font-size: 2.4rem;
  opacity: 0.85;
}

.work-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.work-tags span {
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.work-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.work-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 16px;
}

.work-links {
  display: flex;
  gap: 20px;
}

.work-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.work-link span {
  transition: transform 0.25s var(--ease);
}

.work-link:hover {
  color: var(--accent);
}

.work-link:hover span {
  transform: translateX(3px);
}

/* ===== Contact ===== */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px;
  backdrop-filter: blur(12px);
}

.contact-lead {
  margin-top: 16px;
  color: var(--text-secondary);
  max-width: 360px;
  font-size: 1.05rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}

.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.channel:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.channel-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.channel-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.channel-value {
  font-size: 0.925rem;
  font-weight: 500;
}

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

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

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-brand .logo-mark {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-layout,
  .about-grid,
  .skills-bento,
  .contact-panel {
    grid-template-columns: 1fr;
  }
  
  .hero-side {
    max-width: 400px;
  }
  
  .work-item {
    grid-template-columns: 1fr;
  }
  
  .work-visual {
    flex-direction: row;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 16px;
  }
  
  .work-icon {
    font-size: 1.8rem;
  }
}

@media (max-width: 720px) {
  .nav,
  .nav-cta {
    display: none;
  }
  
  .nav.open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(9, 9, 11, 0.96);
    backdrop-filter: blur(20px);
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  
  .nav.open .nav-link {
    padding: 14px 16px;
    font-size: 1.05rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .contact-panel {
    padding: 32px 24px;
  }
  
  .about-meta {
    flex-direction: column;
    gap: 20px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 32px, 1120px);
  }
  
  .section {
    padding: 80px 0;
  }
  
  .hero-card-value {
    font-size: 2rem;
  }
}
