/* Studio portfolio — warm, modern, single page */

:root {
  --cream: #f6f3ee;
  --cream-dark: #ebe6de;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #7a7a7a;
  --accent: #c45c26;
  --accent-hover: #a34d1f;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(26, 26, 26, 0.08);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --wrap-max: 1100px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --header-h: 72px;
  --section-pad: clamp(3rem, 8vw, 5rem);
  --touch-min: 44px;
}

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

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

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.35);
  z-index: 98;
  top: var(--header-h);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(246, 243, 238, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

.logo span { color: var(--accent); font-weight: 800; }

.hero-brand {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.hero-brand strong {
  color: var(--ink);
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-size: 1.1em;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.site-footer a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--white);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s;
}

.nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--ink);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover { background: var(--accent); transform: translateY(-1px); }

.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

.header-inner .btn-talk {
  background: var(--ink);
}

.header-inner .btn-resume {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(26, 26, 26, 0.15);
}

.header-inner .btn-resume:hover {
  background: var(--white);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-resume {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.nav-resume:hover {
  color: var(--accent-hover) !important;
}

.contact-pdf {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-pdf:hover {
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(26, 26, 26, 0.15);
}

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

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover { background: var(--cream); color: var(--ink); }

/* Hero */
.hero {
  padding: calc(var(--header-h) + 4rem) 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: 2rem;
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cream-dark);
}

.hero-meta strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}

.hero-meta span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Hero illustration — terminal */
.hero-art {
  position: relative;
  min-height: 320px;
}

.terminal {
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: float-terminal 5s ease-in-out infinite;
}

@keyframes float-terminal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: #2d2d2d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
}

.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }

.terminal-bar p {
  margin-left: auto;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: ui-monospace, monospace;
}

.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  overflow-x: auto;
}

.terminal-body code { white-space: pre; }

.t-dim { color: rgba(255, 255, 255, 0.35); }
.t-ok { color: #6ee7a0; }
.t-accent { color: #f4a582; }

.orbit-card {
  position: absolute;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 100px;
  box-shadow: var(--shadow);
  color: var(--ink);
  animation: float-badge 4s ease-in-out infinite;
}

.orbit-1 { top: -8px; right: -12px; animation-delay: 0s; }
.orbit-2 { bottom: 40%; left: -24px; animation-delay: 0.8s; }
.orbit-3 { bottom: 8px; right: 20px; animation-delay: 1.6s; color: var(--accent); border-color: rgba(196, 92, 38, 0.25); }

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Tech marquee */
.hero-marquee {
  margin-top: 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--cream-dark);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  max-width: 100%;
}

.hero-marquee.wrap {
  padding-inline: 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 100px;
}

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

/* Sections */
.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--white);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-layout h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text p:last-child { margin-bottom: 0; }

/* Skills */
.skills-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.skills-header .section-heading {
  margin-bottom: 0;
}

.skills-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 36ch;
  margin-left: auto;
  text-align: right;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.skill-block {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.skill-block:hover {
  border-color: rgba(196, 92, 38, 0.35);
  box-shadow: var(--shadow);
}

.skill-block-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cream-dark);
}

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(196, 92, 38, 0.1);
  color: var(--accent);
  border-radius: var(--radius-sm);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  background: var(--cream);
  color: var(--ink-soft);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.skill-block:hover .skill-tags li {
  border-color: var(--cream-dark);
}

.skill-tags li:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.soft-skills {
  padding: 1.5rem 1.75rem;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
}

.soft-skills h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.soft-skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.soft-skills li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.35rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 100px;
}

/* Work */
.work-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.section-alt + .section .work-card,
.section:not(.section-alt) .work-card {
  background: var(--white);
}

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.work-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.work-role {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.work-head time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.work-list {
  display: grid;
  gap: 0.5rem;
}

.work-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.95rem;
}

.work-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.wins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.win {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cream-dark);
  background: var(--white);
}

.win-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.win p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.project-featured {
  grid-row: span 2;
}

.project-item {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--cream-dark);
  transition: transform 0.25s, box-shadow 0.25s;
}

.project-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-featured .project-img {
  aspect-ratio: 4/3;
}

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

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

.project-info {
  padding: 1.25rem 1.5rem 1.5rem;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.project-info p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.stack {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* GitHub repositories */
.github-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.github-profile-btn {
  flex-shrink: 0;
}

.github-intro {
  max-width: 42rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.github-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2.5rem 0 1.25rem;
}

.github-private-wrap[hidden] {
  display: none;
}

.github-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.github-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.25s, box-shadow 0.25s;
}

.github-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.github-card-private {
  background: var(--cream);
}

.github-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.github-card-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.github-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.github-badge-public {
  background: rgba(49, 120, 198, 0.12);
  color: #2563a8;
}

.github-badge-private {
  background: rgba(26, 26, 26, 0.08);
  color: var(--ink-muted);
}

.github-card-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  flex: 1;
}

.github-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.github-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.github-lang::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lang-color, #7a7a7a);
}

.github-meta-item {
  font-weight: 500;
}

.github-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}

.github-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

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

.github-link-demo {
  color: var(--ink);
}

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

.github-link-muted {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.github-loading,
.github-empty,
.github-error {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.github-error a {
  color: var(--accent);
  font-weight: 600;
}

/* Education */
.edu-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.edu-row li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
  flex-wrap: wrap;
}

.edu-row li:last-child { border-bottom: none; }

.edu-row strong {
  font-weight: 700;
  color: var(--ink);
}

.edu-row span {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Contact */
.contact {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  padding: 5rem 0;
  margin-top: 2rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.contact-copy > p {
  margin-bottom: 2rem;
  max-width: 36ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-links a {
  color: var(--white);
  font-weight: 500;
  transition: color 0.2s;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.15rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.contact-form textarea { resize: vertical; min-height: 120px; }

/* Footer */
.site-footer {
  background: var(--ink);
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===== Tablet (max 900px) ===== */
@media (max-width: 1024px) {
  .header-inner .btn-talk {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: auto;
    right: 0;
    width: min(320px, 85vw);
    bottom: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem var(--gutter) 2rem;
    gap: 0;
    border-bottom: 1px solid var(--cream-dark);
    transform: translateX(100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 99;
  }

  .nav.open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav a {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    padding: 1rem 0;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--cream-dark);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    flex-shrink: 0;
  }

  .header-inner .btn-sm { display: none; }

  .nav-resume {
    border-bottom: none !important;
    margin-top: 0.5rem;
    padding-top: 1rem !important;
    border-top: 1px solid var(--cream-dark) !important;
  }

  .logo { font-size: 1.05rem; }

  /* Hero */
  .hero {
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 2.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-art {
    order: 2;
    min-height: auto;
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    margin-bottom: 0.75rem;
  }

  .hero-brand {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }

  .eyebrow {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .lead {
    font-size: 1rem;
    max-width: none;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    margin-bottom: 1.75rem;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
  }

  .hero-meta > div {
    text-align: center;
  }

  .hero-meta strong {
    font-size: 1.1rem;
  }

  .hero-marquee {
    margin-top: 2rem;
    padding: 0.75rem 0;
  }

  .orbit-2 { left: 0; }
  .orbit-1 { right: 0; }

  /* Sections */
  .section-heading {
    margin-bottom: 1.75rem;
    font-size: clamp(1.5rem, 5vw, 1.85rem);
  }

  .about-layout,
  .contact-inner,
  .skills-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-layout h2 {
    font-size: clamp(1.35rem, 4.5vw, 1.65rem);
  }

  .skills-header {
    margin-bottom: 1.75rem;
  }

  .skills-desc {
    margin-left: 0;
    text-align: left;
    max-width: none;
    font-size: 0.95rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .skill-block {
    padding: 1.25rem;
  }

  .soft-skills {
    padding: 1.25rem;
  }

  .work-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .work-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .work-head h3 {
    font-size: 1.1rem;
  }

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

  .win {
    padding: 1.25rem;
  }

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

  .project-featured {
    grid-row: span 1;
  }

  .project-info {
    padding: 1.15rem 1.25rem 1.35rem;
  }

  .contact {
    padding: var(--section-pad) 0;
    margin-top: 0;
  }

  .contact-inner {
    gap: 2.5rem;
  }

  .contact h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .edu-row li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.15rem 1.25rem;
  }
}

/* ===== Phone (max 600px) ===== */
@media (max-width: 600px) {
  :root {
    --header-h: 60px;
    --gutter: 1.25rem;
  }

  .hero {
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 2rem;
  }

  .hero-inner {
    gap: 1.5rem;
  }

  .hero-art {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 0.68rem;
    padding: 1rem;
  }

  .orbit-card {
    font-size: 0.65rem;
    padding: 0.35rem 0.65rem;
  }

  .orbit-2 {
    left: -4px;
    bottom: 35%;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.65rem;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.9rem 1.25rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: none;
    padding-top: 0;
  }

  .hero-meta > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--cream-dark);
  }

  .hero-meta > div:last-child {
    border-bottom: none;
  }

  .hero-meta strong {
    font-size: 1rem;
  }

  .hero-meta span {
    font-size: 0.85rem;
  }

  .marquee-track span {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
  }

  .section {
    padding: clamp(2.5rem, 10vw, 3.5rem) 0;
  }

  .skill-tags li {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  .soft-skills ul {
    gap: 0.5rem;
  }

  .soft-skills li {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
  }

  .work-list li {
    font-size: 0.9rem;
    padding-left: 1rem;
  }

  .project-img {
    aspect-ratio: 16/11;
  }

  .project-featured .project-img {
    aspect-ratio: 16/10;
  }

  .contact-form input,
  .contact-form textarea {
    min-height: var(--touch-min);
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 0.9rem 1rem;
  }

  .contact-form textarea {
    min-height: 120px;
  }

  .contact-form .btn {
    width: 100%;
    min-height: var(--touch-min);
    margin-top: 0.25rem;
  }

  .contact-links li {
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
  }

  .site-footer {
    padding: 1.25rem 0 1.75rem;
    text-align: center;
  }

  .site-footer p {
    font-size: 0.8rem;
    line-height: 1.6;
  }
}

/* ===== Small phone (max 380px) ===== */
@media (max-width: 380px) {
  .hero h1 {
    font-size: 1.65rem;
  }

  .eyebrow {
    letter-spacing: 0.05em;
    line-height: 1.4;
  }

  .orbit-1,
  .orbit-2 {
    display: none;
  }

  .terminal-bar p {
    font-size: 0.6rem;
  }
}
