/* ═══════════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════════ */
:root {
  /* Body */
  --bg: #f6f8fa;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #656d76;
  --line: rgba(31, 35, 40, 0.12);
  --accent: #175bb8;
  --accent-2: #0f3f86;
  --chip: #dbeafe;
  --chip-ink: #1e40af;

  /* Hero (dark) */
  --hero-bg: #0a0f14;
  --hero-ink: #e6edf3;
  --hero-muted: #7d8590;
  --hero-line: rgba(230, 237, 243, 0.1);
  --hero-accent: #4493f8;

  /* Highlight on hover */
  --hl-bg: #175bb8;
  --hl-ink: #ffffff;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(31, 35, 40, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 35, 40, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-family: "Satoshi", system-ui, sans-serif; }
p { line-height: 1.7; margin: 0; }

/* ═══════════════════════════════════════════════
   TOP NAV
═══════════════════════════════════════════════ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 248, 250, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 3rem;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex-shrink: 0;
}

.nav-brand-name {
  font-family: "Satoshi", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nav-brand-role {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1;
  letter-spacing: 0.02em;
}

.menu {
  display: flex;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}

.menu a {
  padding: 0.4rem 0.72rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  letter-spacing: 0.01em;
}

.menu a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
}

.menu a.active {
  color: var(--accent);
  border-color: rgba(23, 91, 184, 0.3);
  background: rgba(23, 91, 184, 0.07);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   CONTENT WRAPPER
═══════════════════════════════════════════════ */
.content {
  transition: opacity 130ms ease;
}

.content.is-transitioning {
  opacity: 0.35;
}

/* Inner max-width container used by all sections */
.inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* ═══════════════════════════════════════════════
   HERO  (home page)
═══════════════════════════════════════════════ */
.hero-section {
  background: var(--hero-bg);
  background-image:
    linear-gradient(rgba(230, 237, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 237, 243, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--hero-ink);
  padding: 5.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 65% 40%, rgba(23, 91, 184, 0.18), transparent 65%),
    radial-gradient(ellipse 35% 45% at 15% 80%, rgba(68, 147, 248, 0.09), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 3rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hero-accent);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  background: var(--hero-accent);
  flex-shrink: 0;
}

.display {
  font-family: "Satoshi", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--hero-ink);
  margin: 0 0 1.75rem;
}

.hero-lede {
  font-size: 1rem;
  color: var(--hero-muted);
  line-height: 1.75;
  margin: 0 0 0.5rem;
}

.hero-contact {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  font-size: 0.86rem;
}

.hero-contact a {
  color: var(--hero-accent);
  text-decoration: none;
}

.hero-contact a:hover { text-decoration: underline; }

.hero-contact span { color: var(--hero-muted); }

/* ═══════════════════════════════════════════════
   PAGE HERO  (inner pages)
═══════════════════════════════════════════════ */
.page-hero {
  background: var(--hero-bg);
  background-image:
    linear-gradient(rgba(230, 237, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 237, 243, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--hero-ink);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--hero-line);
}

.page-hero .eyebrow {
  color: var(--hero-accent);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.page-hero h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  letter-spacing: -0.025em;
  color: var(--hero-ink);
  margin: 0 0 0.75rem;
}

.page-hero .lede {
  font-size: 0.95rem;
  color: var(--hero-muted);
  max-width: 55ch;
  margin: 0;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════ */
.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child { border-bottom: none; }

.section-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 1.25rem;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  position: relative;
  padding-left: 0.85rem;
}

.section-h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 3px;
  background: var(--accent);
}

/* ═══════════════════════════════════════════════
   HIGHLIGHTS GRID
═══════════════════════════════════════════════ */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  background: var(--line);
  gap: 1px;
  border: 1px solid var(--line);
}

.highlight-card {
  background: var(--surface);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 120ms ease;
}

.highlight-card:hover { background: #fafbfc; }

.highlight-card .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.highlight-card h3 {
  font-size: 2.1rem;
  letter-spacing: -0.03em;
  margin: 0;
}

.highlight-card h3 .num { color: var(--accent); }
.highlight-card h3:hover .num { color: var(--hl-ink); }

.highlight-card p { font-size: 0.88rem; color: var(--muted); }

.highlight-card .inline-link {
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ═══════════════════════════════════════════════
   SKILLS GRID
═══════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: var(--line);
  gap: 1px;
  border: 1px solid var(--line);
}

.skill-group {
  background: var(--surface);
  padding: 1.5rem;
  transition: background 120ms ease;
}

.skill-group:hover { background: #fafbfc; }

.skill-group h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 700;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

/* ═══════════════════════════════════════════════
   PROJECTS LIST  (numbered, huncwot-style)
═══════════════════════════════════════════════ */
.projects-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.project-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  transition: background 120ms ease;
}

.project-card:hover { background: #fafbfc; }

.project-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.5;
  padding-top: 0.35rem;
  letter-spacing: 0.04em;
}

.project-body h3 {
  font-size: 1.12rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  transition: color 120ms ease;
}


.project-body p {
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0 0 0.35rem;
  max-width: 70ch;
}

.project-body p.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════
   EXPERIENCE LIST  (two-column)
═══════════════════════════════════════════════ */
.exp-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.exp-item {
  background: var(--surface);
  padding: 2rem 1.75rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  transition: background 120ms ease;
}

.exp-item:hover { background: #fafbfc; }

.exp-meta {
  padding-top: 0.2rem;
  border-right: 1px solid var(--line);
  padding-right: 2rem;
}

.exp-period {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: 0;
}

.exp-company {
  font-family: "Satoshi", system-ui, sans-serif;
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.4rem;
  letter-spacing: -0.01em;
}

.exp-location {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.exp-body h3 {
  font-family: "Satoshi", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.exp-body ul {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
}

.exp-body li {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════
   EDUCATION GRID
═══════════════════════════════════════════════ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.edu-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  transition: background 120ms ease;
}

.edu-card:hover { background: #fafbfc; }

.edu-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
}

.edu-card .degree {
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.edu-card .period {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════
   SHARED COMPONENTS
═══════════════════════════════════════════════ */
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.muted { color: var(--muted); }
.lede { max-width: 70ch; }

.chips {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border: 1px solid rgba(23, 91, 184, 0.2);
  padding: 0.18rem 0.55rem;
  background: var(--chip);
  font-size: 0.75rem;
  color: var(--chip-ink);
  font-family: "IBM Plex Mono", monospace;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.7rem;
  font-size: 0.8rem;
}

.meta-row span {
  border: 1px solid var(--line);
  padding: 0.14rem 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
}

/* Status badge colors */
.meta-row .status-live,
.meta-row .status-complete {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

.meta-row .status-delivered {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.meta-row .status-in-progress {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.inline-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.inline-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  text-decoration: none;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.01em;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.14);
}

.btn.ghost {
  border-color: rgba(230, 237, 243, 0.28);
  color: var(--hero-ink);
  background: rgba(255, 255, 255, 0.05);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(230, 237, 243, 0.55);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ═══════════════════════════════════════════════
   SOCIAL ICONS
═══════════════════════════════════════════════ */
.social-icons {
  display: flex;
  gap: 0.4rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.social-icons a svg { width: 16px; height: 16px; }

.social-icons a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.12);
}

/* ═══════════════════════════════════════════════
   HOVER HIGHLIGHT EFFECT  (h2, h3 in light sections)
═══════════════════════════════════════════════ */
.section h2:hover,
.section h3:hover,
.highlight-card h3:hover,
.project-body h3:hover,
.exp-body h3:hover,
.edu-card h3:hover {
  background: var(--hl-bg);
  color: var(--hl-ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
  cursor: default;
}

.section h2,
.section h3,
.highlight-card h3,
.project-body h3,
.exp-body h3,
.edu-card h3 {
  transition: background 110ms ease, color 110ms ease, box-shadow 110ms ease;
}

/* ═══════════════════════════════════════════════
   REVEAL ANIMATION
═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════
   PAGE CONTENT WRAPPER
═══════════════════════════════════════════════ */
.page-content {
  padding: 3rem 0;
}

/* ═══════════════════════════════════════════════
   EDITOR  (edit.html - keep minimal)
═══════════════════════════════════════════════ */
.editor-shell {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0 2rem;
  display: grid;
  gap: 0.9rem;
}

.editor-head p { margin: 0.44rem 0 0; }

.editor-main {
  display: grid;
  gap: 0.58rem;
}

.editor-main label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
}

.editor-main input,
.editor-main textarea,
.editor-main button {
  font: inherit;
}

.editor-main input,
.editor-main textarea {
  border: 1px solid var(--line);
  padding: 0.58rem 0.72rem;
  background: rgba(255, 255, 255, 0.9);
}

.editor-main input:focus,
.editor-main textarea:focus {
  outline: 2px solid rgba(23, 91, 184, 0.25);
  border-color: rgba(23, 91, 184, 0.5);
}

.editor-main textarea.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem;
}

.tiny { font-size: 0.8rem; }

.status {
  min-height: 1.25rem;
  margin: 0;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .topnav-inner,
  .inner,
  .hero-inner {
    padding: 0 2rem;
  }

  .exp-item {
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
  }

  .exp-meta {
    padding-right: 1.25rem;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topnav-inner {
    padding: 0.6rem 1.25rem;
    height: auto;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .nav-brand-role { display: none; }

  .menu {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding-bottom: 0.25rem;
  }

  .inner,
  .hero-inner {
    padding: 0 1.25rem;
  }

  .hero-section { padding: 3.5rem 0 3rem; }

  .display {
    font-size: clamp(2rem, 9vw, 3rem);
    max-width: none;
  }

  .section { padding: 2.5rem 0; }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .exp-meta {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 0.75rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .project-num { display: none; }

  .highlights-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .topnav-inner,
  .inner,
  .hero-inner {
    padding: 0.6rem 1rem;
  }

  .nav-end .btn {
    font-size: 0.76rem;
    padding: 0.38rem 0.65rem;
  }

  .hero-section { padding: 2.5rem 0 2.25rem; }
}

/* ═══════════════════════════════════════════════
   TOUCH — suppress hover jumps
═══════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  .menu a:hover,
  .btn.primary:hover,
  .btn.ghost:hover,
  .social-icons a:hover,
  .section h2:hover,
  .section h3:hover,
  .highlight-card h3:hover,
  .project-body h3:hover,
  .exp-body h3:hover,
  .edu-card h3:hover {
    background: inherit;
    color: inherit;
    box-shadow: none;
    border-color: inherit;
    text-decoration: none;
  }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
