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

:root {
  --bg: #f0eef6;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-visual: #e8e4f3;
  --bg-hero: linear-gradient(160deg, #ede9f7 0%, #f5f3fa 40%, #f0eef6 100%);
  --accent: #6c5ce7;
  --accent-soft: rgba(108, 92, 231, 0.08);
  --accent-medium: rgba(108, 92, 231, 0.15);
  --accent-hover: #5a4bd6;
  --text: #2d2640;
  --text-secondary: #6e6884;
  --text-tertiary: #a09baf;
  --border: rgba(108, 92, 231, 0.08);
  --border-hover: rgba(108, 92, 231, 0.18);
  --border-card: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(45, 38, 64, 0.04);
  --shadow-md: 0 4px 16px rgba(45, 38, 64, 0.06);
  --shadow-lg: 0 8px 32px rgba(45, 38, 64, 0.08);
  --shadow-glow: 0 4px 24px rgba(108, 92, 231, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1080px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }

.text-accent { color: var(--accent); }

/* ===== NAV ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 238, 246, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
  font-weight: 450;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-hero);
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-hover);
  background: var(--accent-soft);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 24px;
  color: var(--text);
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

.hero-quote {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.65;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
}

.hero-links {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* ===== ECOSYSTEM DIAGRAM â VENN ===== */
.diagram {
  position: relative;
  width: 460px;
  height: 420px;
  flex-shrink: 0;
}

/* Venn circles */
.venn-circle {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  top: 50px;
  pointer-events: none;
}

.venn-design {
  left: 0;
  background: radial-gradient(circle at 40% 45%, rgba(108, 92, 231, 0.14) 0%, rgba(108, 92, 231, 0.06) 55%, transparent 75%);
  border: 1.5px solid rgba(108, 92, 231, 0.20);
  position: relative;
}

/* Pulse on the Design circle */
.venn-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(108, 92, 231, 0.18);
  opacity: 0;
  animation: venn-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes venn-pulse {
  0% { opacity: 0.4; inset: -3px; }
  60% { opacity: 0; inset: -16px; }
  100% { opacity: 0; inset: -16px; }
}

.venn-dev {
  right: 0;
  background: radial-gradient(circle at 60% 45%, rgba(108, 92, 231, 0.07) 0%, rgba(108, 92, 231, 0.02) 60%, transparent 75%);
  border: 1.5px solid rgba(108, 92, 231, 0.10);
}

/* Circle labels */
.venn-label {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
}

.venn-label-design {
  top: 42px;
  left: 80px;
  opacity: 0.75;
  font-weight: 700;
  font-size: 11px;
}

.venn-label-dev {
  top: 42px;
  right: 80px;
}

/* Nodes base */
.dg-node {
  position: absolute;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--mono);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: float 6s ease-in-out infinite;
  cursor: default;
  z-index: 1;
}

.dg-node:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow), 0 8px 32px rgba(108, 92, 231, 0.10);
  transform: translateY(-4px) scale(1.06);
  color: var(--text);
  z-index: 3;
}

.dg-icon {
  margin-right: 5px;
  font-style: normal;
  display: inline-block;
  transition: transform 0.3s ease;
}

.dg-node:hover .dg-icon {
  transform: scale(1.15);
}

/* Highlighted node (overlap zone) */
.dg-highlight {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  font-weight: 600;
  position: absolute;
  z-index: 2;
}

.dg-highlight:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Soft highlight for tokens bridge */
.dg-highlight-soft {
  background: rgba(108, 92, 231, 0.12);
  border-color: rgba(108, 92, 231, 0.25);
  color: var(--accent);
  font-weight: 600;
}

.dg-highlight-soft:hover {
  background: rgba(108, 92, 231, 0.18);
  border-color: var(--accent);
}

/* Highlight hover for non-centered nodes */
.dg-highlight:not([class*="dg-ai"]):not([class*="dg-tokens"]):not([class*="dg-a11y"]):hover {
  transform: translateY(-4px) scale(1.06);
}

/* === Node positions === */

/* Design side (left circle) */
.dg-figma { top: 80px; left: 22px; animation-delay: 0s; }
.dg-variables { top: 148px; left: 8px; animation-delay: 0.6s; }
.dg-components { top: 216px; left: 22px; animation-delay: 1.2s; }
.dg-testing { top: 284px; left: 8px; animation-delay: 1.8s; }
.dg-adoption { top: 340px; left: 50px; animation-delay: 2.4s; }

/* Overlap zone (center) */
.dg-ai { top: 120px; left: 50%; transform: translateX(-50%); animation-delay: 0.3s; }
.dg-ai:hover { transform: translateX(-50%) translateY(-4px) scale(1.06); }
.dg-tokens-bridge { top: 205px; left: 50%; transform: translateX(-50%); animation-delay: 0.9s; }
.dg-tokens-bridge:hover { transform: translateX(-50%) translateY(-4px) scale(1.06); }
.dg-a11y { top: 290px; left: 50%; transform: translateX(-50%); animation-delay: 1.5s; }
.dg-a11y:hover { transform: translateX(-50%) translateY(-4px) scale(1.06); }

/* Dev side (right circle) */
.dg-github { top: 90px; right: 22px; animation-delay: 0.4s; }
.dg-storybook { top: 170px; right: 10px; animation-delay: 1.0s; }
.dg-claude-code { top: 250px; right: 15px; animation-delay: 1.6s; }
.dg-docs { top: 320px; right: 50px; animation-delay: 2.2s; }

/* Float animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Override float for centered nodes */
.dg-ai {
  animation: float-center 6s ease-in-out 0.3s infinite;
}
.dg-tokens-bridge {
  animation: float-center 6s ease-in-out 0.9s infinite;
}
.dg-a11y {
  animation: float-center 6s ease-in-out 1.5s infinite;
}

@keyframes float-center {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.btn:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
}

.btn svg { width: 14px; height: 14px; }

/* ===== SECTIONS ===== */
section { padding: 60px 0 80px; }

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

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

.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ===== PROJECT CARDS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project-card-visual {
  padding: 32px;
  background: var(--bg-card-visual);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.project-card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(108, 92, 231, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(108, 92, 231, 0.04) 0%, transparent 50%);
}

.card-icon {
  color: var(--accent);
  opacity: 0.7;
  transition: opacity var(--transition);
}

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

.project-card-content {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-card-arrow {
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.project-card:hover .project-card-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

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

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-hover);
  letter-spacing: 0.02em;
}

.project-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.experience-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.experience-item:last-child { border-bottom: none; }

.experience-date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 450;
  font-family: var(--mono);
  padding-top: 2px;
}

.experience-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.experience-content .company {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.experience-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== PROJECT DETAIL PAGES ===== */
.project-hero { padding: 60px 0 40px; }

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: color var(--transition);
}

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

.project-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.project-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-meta .tag { font-size: 13px; }

.project-content { padding: 0 0 80px; }

.project-content h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
}

.project-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.project-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 720px;
}

.project-content ul {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}

.project-content ul li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}

.project-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.highlight-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.highlight-box h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.highlight-box ul li { font-size: 14px; }

.project-nutshell {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.project-nutshell strong { color: var(--accent); }

/* ===== ABOUT PAGE ===== */
.about-content { max-width: 640px; }

.about-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-content strong { color: var(--text); font-weight: 550; }

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

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

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

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

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

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

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column;
    gap: 40px;
  }
  .diagram {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }
  .venn-circle { width: 260px; height: 260px; }
}

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

  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(240, 238, 246, 0.95);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }

  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 32px; }

  .diagram { display: none; }

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

  .experience-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  footer .container {
    flex-direction: column;
    gap: 12px;
  }
}
