/* ========================================
   Maya Chen — Developer Portfolio
   Bold dark theme · Electric cyan accent
   Space Grotesk (headings) + DM Sans (body)
   ======================================== */

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

/* === Custom Properties === */
:root {
  /* Palette */
  --bg:       #0a0e17;
  --surface:  #111827;
  --surface-2:#1a2236;
  --border:   rgba(255, 255, 255, 0.08);
  --ink:      #e8ecf4;
  --muted:    #7c8ba5;
  --accent:   #00f0ff;
  --accent-dim: rgba(0, 240, 255, 0.12);
  --accent-glow: rgba(0, 240, 255, 0.25);
  --pink:     #ff4d8d;
  --lime:     #a3ff12;

  /* Typography scale (1.250 — Major Third) */
  --fs-xs:    0.8rem;
  --fs-sm:    0.9rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.25rem;
  --fs-xl:    1.563rem;
  --fs-2xl:   1.953rem;
  --fs-3xl:   2.441rem;
  --fs-4xl:   3.052rem;
  --fs-hero:  clamp(2.8rem, 6vw, 5rem);

  /* Spacing */
  --sp-xs:    0.5rem;
  --sp-sm:    0.75rem;
  --sp-md:    1rem;
  --sp-lg:    1.5rem;
  --sp-xl:    2.5rem;
  --sp-2xl:   4rem;
  --sp-3xl:   6rem;

  /* Layout */
  --max-w:    1120px;
  --radius:   10px;
  --radius-lg:16px;

  /* Transitions */
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --speed:    0.3s;
}

/* === Base === */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* === Layout === */
.container {
  width: min(90%, var(--max-w));
  margin-inline: auto;
}

.section {
  padding: var(--sp-3xl) 0;
}

.section-label {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}

.section-title {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-lg);
}

.section-desc {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 560px;
  margin-bottom: var(--sp-xl);
}

/* === Header === */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--speed) var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

.main-nav {
  display: flex;
  gap: var(--sp-xl);
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color var(--speed) var(--ease);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  inset-block-end: -4px;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--speed) var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--ink); }
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 110;
}
.hamburger span {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--speed) var(--ease);
}
.hamburger span:nth-child(1) { inset-block-start: 0; }
.hamburger span:nth-child(2) { inset-block-start: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { inset-block-end: 0; }

.hamburger.open span:nth-child(1) { inset-block-start: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { inset-block-end: auto; inset-block-start: 50%; transform: translateY(-50%) rotate(-45deg); }

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: var(--sp-2xl);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 100px;
  padding: var(--sp-xs) var(--sp-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-lg);
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-lg);
}
.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 480px;
  margin-bottom: var(--sp-xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #33f5ff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
}
.btn-ghost i { transition: transform var(--speed) var(--ease); }
.btn-ghost:hover i { transform: translateX(4px); }

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-avatar {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), var(--surface-2));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: var(--accent);
  position: relative;
}

.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 240, 255, 0.15);
  animation: spin 30s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Featured Work === */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--speed) var(--ease);
}
.project-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-thumb {
  height: 200px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: var(--sp-lg);
}

.project-body h3 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-xl);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.project-body p {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-md);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
}

.tag {
  font-size: var(--fs-xs);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-weight: 500;
}
.tag-cyan  { background: var(--accent-dim); color: var(--accent); }
.tag-pink  { background: rgba(255, 77, 141, 0.12); color: var(--pink); }
.tag-lime  { background: rgba(163, 255, 18, 0.12); color: var(--lime); }

/* === About Preview (Home) === */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}

.about-preview-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--accent);
}

.about-preview h2 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-md);
}

.about-preview p {
  color: var(--muted);
  margin-bottom: var(--sp-lg);
  line-height: 1.7;
}

/* === CTA Banner === */
.cta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3xl) var(--sp-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-md);
  position: relative;
}

.cta-banner p {
  color: var(--muted);
  margin-bottom: var(--sp-xl);
  position: relative;
}

/* === Work Page Grid === */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-lg);
}

.filter-bar {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1.2rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  font-family: 'DM Sans', sans-serif;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* === About Page === */
.about-hero {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--sp-3xl);
}

.about-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--surface-2), var(--accent-dim));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--accent);
}

.about-hero h1 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-md);
}

.about-hero p {
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.7;
  margin-bottom: var(--sp-md);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-lg);
}

.skill-group h3 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-md);
  color: var(--accent);
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.skill-group li {
  color: var(--muted);
  font-size: var(--fs-sm);
  padding-left: var(--sp-md);
  position: relative;
}
.skill-group li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: var(--fs-xs);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--sp-xl);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--sp-xl);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-xl) - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-date {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-xs);
}

.timeline-item h3 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.timeline-item p {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* === Contact Page === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-2xl);
}

.contact-info h1 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-md);
}

.contact-info > p {
  color: var(--muted);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-xl);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-item span,
.contact-item a {
  font-size: var(--fs-sm);
  color: var(--muted);
  transition: color var(--speed) var(--ease);
}
.contact-item a:hover { color: var(--accent); }

/* Socials */
.socials {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--fs-md);
  transition: all var(--speed) var(--ease);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Contact form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}

.form-group {
  margin-bottom: var(--sp-lg);
}

.form-group label {
  display: block;
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-sm);
  color: var(--ink);
  transition: border-color var(--speed) var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.form-group .error-msg {
  font-size: var(--fs-xs);
  color: #ff4d4d;
  margin-top: 4px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #ff4d4d;
}
.form-group.has-error .error-msg { display: block; }

.form-success {
  background: rgba(163, 255, 18, 0.08);
  border: 1px solid rgba(163, 255, 18, 0.2);
  border-radius: var(--radius);
  padding: var(--sp-md);
  color: var(--lime);
  font-size: var(--fs-sm);
  text-align: center;
  display: none;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-xl) 0;
  margin-top: var(--sp-3xl);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.footer-links {
  display: flex;
  gap: var(--sp-lg);
}
.footer-links a {
  color: var(--muted);
  transition: color var(--speed) var(--ease);
}
.footer-links a:hover { color: var(--accent); }

/* === Page Headers (work, about, contact) === */
.page-header {
  padding-top: 120px;
  padding-bottom: var(--sp-2xl);
}

.page-header h1 {
  font-family: 'Space Grotesk', monospace;
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-sm);
}

.page-header p {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 520px;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-avatar { width: 220px; height: 220px; font-size: 4rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .about-preview { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .about-portrait { max-width: 300px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-xl);
    transform: translateX(100%);
    transition: transform var(--speed) var(--ease);
    z-index: 100;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav .nav-link { font-size: var(--fs-xl); }
  .hamburger { display: block; }

  .section { padding: var(--sp-2xl) 0; }
  .section-title { font-size: var(--fs-2xl); }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-avatar { width: 180px; height: 180px; font-size: 3rem; }

  .footer-inner { flex-direction: column; gap: var(--sp-md); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
