body {
  background-color: #0e0e0e;
  color: #e5e2e1;
  min-height: 100vh;
  font-family: "Hanken Grotesk", sans-serif;
  line-height: 1.6;
}

/* Keep the display face expressive; let the content stay quiet and readable. */
.site-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #c8c3bf;
  font-size: 15px;
  font-weight: 500;
}

.site-links a:hover { color: #ffb693; }
#mobile-nav .site-links a { display: flex; padding: 10px 0; }
nav[aria-label="Primary navigation"] > div:first-child { min-height: 80px; padding-top: 16px; padding-bottom: 16px; }
.icon { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#menu-toggle .icon { display: block; }
@media (max-width: 1023px) {
  #menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
}

.hero { padding-top: 56px; padding-bottom: 40px; }
.hero-layout { display: grid; gap: 40px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-intro { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.hero-avatar { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; }
.hero-name { font-size: 16px; font-weight: 600; }
.hero-role { color: #c8c3bf; font-size: 13px; line-height: 1.5; }
.hero-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
.hero-title-line { display: block; }
.hero-title-accent { color: #ffb693; }

@keyframes hero-title-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero[data-intro-ready="true"] .hero-title-line { animation: hero-title-enter 650ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero[data-intro-ready="true"] .hero-title-accent { animation-delay: 90ms; }
}

.section-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: #c8c3bf; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: 0.1em; text-transform: uppercase; }
.section-index { flex-shrink: 0; padding-right: 12px; border-right: 1px solid #ffffff30; color: #ffb693; font-variant-numeric: tabular-nums; }
.contact-layout { max-width: 760px; margin: 0 auto; text-align: center; }
.contact-layout .section-kicker, .contact-reply { justify-content: center; }
#contact h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.15; }
.contact-layout p.max-w-md { margin-left: auto; margin-right: auto; }
.contact-availability { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 480px; margin: 28px auto 0; }
.contact-social { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: #c8c3bf; font-size: 14px; }
.contact-social:hover { color: #ffb693; }
.hero-description { max-width: 46ch; color: #c8c3bf; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button-primary, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
}
.button-primary { background: #ff6b00; color: #111; }
.button-primary:hover { background: #ff8a38; }
.button-secondary { border-color: #ffffff30; color: #e5e2e1; }
.button-secondary:hover { background: #ffffff0a; border-color: #ffffff60; }
/* One explicit rule keeps all clickable controls sharp, including Tailwind cards. */
button, a, input, textarea, summary, [role="button"] { border-radius: 0 !important; }
.hero-availability { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: #c8c3bf; font-size: 13px; }
.hero-availability > span, .hero-image-dot { width: 6px; height: 6px; background: #ffb693; border-radius: 50%; flex-shrink: 0; }
.hero-visual { display: none; }
.hero-proof { display: grid; gap: 16px; margin-top: 36px; padding: 24px 0; border-top: 1px solid #ffffff1a; border-bottom: 1px solid #ffffff1a; }
.hero-proof p { color: #c8c3bf; font-size: 14px; }
.hero-proof strong { color: #e5e2e1; font-size: 23px; margin-right: 6px; font-weight: 600; }
.hero-proof-detail { max-width: 38ch; }
.hero-collaborators { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 24px; }
.hero-collaborators > p { font-size: 13px; color: #b2aca7; }
.hero-collaborators > div { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.hero-collaborators span { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: #c8c3bf; }

/* Static by default: JavaScript enables a controllable, seamless identity loop. */
.identity-strip { min-width: 0; padding-top: 12px; padding-bottom: 24px; }
.identity-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.identity-toolbar > p { display: flex; align-items: center; gap: 8px; color: #b2aca7; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.14em; }
.identity-toolbar > p::before { content: ""; width: 5px; height: 5px; background: #ff6b00; }
.identity-window { overflow: hidden; border: 1px solid #ffffff1a; border-left: 2px solid #ff6b00; background: #121311; padding: 22px 0; }
.identity-window[data-motion-control="true"] { cursor: pointer; }
.identity-strip[data-paused="true"] .identity-window { border-color: #ffb693; }
.identity-viewport { overflow: hidden; }
.identity-track { display: flex; }
.identity-group { box-sizing: border-box; display: flex; flex: 0 0 auto; max-width: 100%; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 0 20px; font-family: "Syne", sans-serif; font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; }
.identity-group + .identity-group { display: none; }
.identity-star { color: #ff6b00; font-size: 17px; }
.identity-craft { color: #b2aca7; font-family: "JetBrains Mono", monospace; font-size: clamp(10px, 1vw, 12px); font-weight: 500; line-height: 1.5; letter-spacing: 0.12em; }

@keyframes identity-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: no-preference) {
  .identity-strip[data-animated="true"] .identity-viewport { mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
  .identity-strip[data-animated="true"] .identity-track { width: max-content; animation: identity-scroll 40s linear infinite; }
  .identity-strip[data-animated="true"] .identity-group { min-width: min(calc(100vw - 48px), 1232px); max-width: none; flex-wrap: nowrap; justify-content: space-around; gap: 28px; padding: 0 28px 0 0; white-space: nowrap; }
  .identity-strip[data-animated="true"] .identity-group + .identity-group { display: flex; }
  .identity-strip[data-paused="true"] .identity-track { animation-play-state: paused; }
}

/* Product imagery and original project artwork share consistent preview frames. */
.project-preview { position: relative; aspect-ratio: 16 / 10; border-bottom: 1px solid #ffffff0d; }
.project-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.project-preview-sync { background: #10272a; }
.project-preview-keam { background: #e2ebdf; }
.project-preview-keam img { padding: 0; }
/* Square visual cards, with readable project details outside the square. */
.project-carousel { min-width: 0; }
.project-carousel:focus-visible { outline: 2px solid #ffb693; outline-offset: 8px; }
.project-stage { display: grid; gap: 40px; max-width: 560px; margin: 0 auto; }
.project-slide { min-width: 0; --project-accent: #ffb693; }
.project-slide-blinkbreak { --project-accent: #a3e6b1; }
.project-slide-sync { --project-accent: #7ed9dc; }
.project-face { position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 1; background: #171a17; border: 1px solid #ffffff26; overflow: hidden; }
.project-card-next { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; cursor: inherit; }
.project-card-next[hidden] { display: none; }
.project-card-next:focus-visible { outline: 2px solid var(--project-accent); outline-offset: -4px; }
.project-face .project-preview { flex: 1; min-height: 0; aspect-ratio: auto; border: 0; }
.project-preview-blinkbreak { background: #c9d9c9; }
.project-preview-blinkbreak img { padding: 24px 24px 48px; }
.project-art-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #304d39; font-size: 12px; }
.project-face-title { padding: 20px 24px; border-top: 1px solid #ffffff1a; }
.project-face-title p { color: var(--project-accent); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.1em; }
.project-face-title h3 { margin: 8px 0; font-family: "Syne", sans-serif; font-size: clamp(20px, 2.6vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.project-face-title > span { color: #c8c3bf; font-size: 10px; letter-spacing: 0.08em; }
.project-info { padding-top: 28px; color: #c8c3bf; font-size: 16px; line-height: 1.75; }
.project-info .project-tech { margin-top: 14px; color: #b2aca7; font-size: 12px; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.project-links a { min-height: 48px; font-size: 14px; }
.project-slide-blinkbreak .button-primary { background: #a3e6b1; }
.project-slide-blinkbreak .button-primary:hover { background: #c3f2cd; }
.project-slide-blinkbreak a:focus-visible { outline-color: #a3e6b1; }
.project-navigation { display: flex; justify-content: center; max-width: 560px; margin: 16px auto 0; }
.project-navigation[hidden] { display: none; }
.project-dots { display: flex; }
.project-dots button { display: grid; place-items: center; width: 44px; height: 44px; }
.project-dots button > span { width: 7px; height: 7px; background: #87817b; transition: background-color 0.2s ease, transform 0.2s ease; }
.project-dots button[aria-pressed="true"] > span { background: #ff6b00; transform: scale(1.5); }

/* Every article occupies the same grid cell, so changing projects never jumps the page. */
.project-carousel[data-ready="true"] .project-stage { width: min(calc(100% - 48px), 560px); gap: 0; padding-top: 28px; isolation: isolate; touch-action: pan-y; }
.project-carousel[data-ready="true"] .project-slide { grid-area: 1 / 1; position: relative; pointer-events: none; z-index: 1; }
.project-carousel[data-ready="true"] .project-slide[data-position="active"] { z-index: 3; pointer-events: auto; }
.project-carousel[data-ready="true"] .project-face { transform-origin: center 70%; box-shadow: 0 24px 60px #00000040; transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), opacity 400ms ease, filter 400ms ease; cursor: grab; user-select: none; }
.project-carousel[data-ready="true"] .project-slide[data-position="active"] .project-face { transform: translateX(var(--project-drag, 0px)) rotate(var(--project-tilt, 0deg)); opacity: 1; filter: none; }
.project-carousel[data-ready="true"] .project-slide[data-position="previous"] .project-face { transform: translate(-12%, 14px) rotate(-6deg) scale(0.93); opacity: 0.55; filter: saturate(0.6); }
.project-carousel[data-ready="true"] .project-slide[data-position="next"] .project-face { transform: translate(12%, 14px) rotate(6deg) scale(0.93); opacity: 0.55; filter: saturate(0.6); }
.project-carousel[data-ready="true"] .project-info { transition: opacity 250ms ease; }
.project-carousel[data-ready="true"] .project-slide[aria-hidden="true"] .project-info { visibility: hidden; opacity: 0; }
.project-stage[data-dragging="true"] .project-slide[data-position="active"] .project-face { transition: none; cursor: grabbing; }

@media (max-width: 639px) {
  main > section.px-gutter, main > .identity-strip.px-gutter, footer .px-gutter { padding-left: 20px; padding-right: 20px; }
  nav[aria-label="Primary navigation"] > div { padding-left: 20px; padding-right: 20px; }
  main .text-headline-xl { font-size: clamp(26px, 7vw, 30px); line-height: 1.2; }
  .project-face-title { padding: 16px; }
  .project-face-title > span { display: none; }
  .project-links a { flex: 1 1 100%; }
  .project-preview-blinkbreak img { padding: 16px 16px 38px; }
  .project-art-caption { font-size: 10px; }
  .hero { padding-top: 36px; }
  .hero-intro { margin-bottom: 20px; }
  .hero-title { font-size: clamp(32px, 8.8vw, 40px); }
  .hero-description { font-size: 17px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-actions a { min-width: 0; padding: 12px 8px; gap: 8px; font-size: 13px; white-space: nowrap; }
  .hero-proof { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; padding: 20px 0; }
  .hero-proof strong { display: block; margin: 0 0 4px; }
  .hero-proof-detail { grid-column: 1 / -1; max-width: none; }
  .hero-collaborators { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 18px; }
  .hero-collaborators > div { gap: 20px; }
  .hero-collaborators span { font-size: 10px; letter-spacing: 0.08em; }
  .project-carousel[data-ready="true"] .project-stage { width: calc(100% - 32px); padding-top: 22px; }
  .project-carousel[data-ready="true"] .project-slide[data-position="previous"] .project-face { transform: translate(-6%, 10px) rotate(-3deg) scale(0.94); }
  .project-carousel[data-ready="true"] .project-slide[data-position="next"] .project-face { transform: translate(6%, 10px) rotate(3deg) scale(0.94); }
  .about-portrait { justify-self: center; text-align: center; }
  .contact-layout { text-align: left; }
  .contact-layout .section-kicker, .contact-reply, .contact-social { justify-content: flex-start; }
  .contact-links { margin-left: 0; margin-right: 0; }
  .contact-links .button-primary, .contact-links .button-secondary { padding: 12px; gap: 12px; font-size: 14px; }
  #skills > .grid { gap: 12px; }
  #skills .hover-lift { padding: 18px; }
  #skills .hover-lift > span { top: -8px; right: 8px; font-size: 64px; }
  #skills .hover-lift > div:first-of-type { gap: 8px; margin-bottom: 18px; }
  #skills .hover-lift > div:first-of-type > span { width: 28px; height: 28px; flex-shrink: 0; }
  #skills .hover-lift h3 { font-size: 10px; line-height: 1.5; letter-spacing: 0.04em; }
  #skills .hover-lift > div:last-child { gap: 6px; }
  #skills .hover-lift > div:last-child > span { padding: 4px 6px; font-size: 11px; }
}

@media (max-width: 359px) {
  .contact-links { grid-template-columns: 1fr; }
}

@media (min-width: 360px) and (max-width: 639px) {
  #skills > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .project-carousel[data-ready="true"] .project-face,
  .project-carousel[data-ready="true"] .project-info { transition: none; }
}

.project-archive { margin-top: 32px; border-top: 1px solid #ffffff26; border-bottom: 1px solid #ffffff26; }
.project-archive > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500; }
.project-archive > summary::-webkit-details-marker { display: none; }
.archive-count { display: inline-block; margin-left: 10px; color: #b2aca7; font-size: 13px; font-weight: 400; }
.archive-toggle { font-size: 28px; font-weight: 400; line-height: 1; }
.project-archive[open] .archive-toggle { transform: rotate(45deg); }
.archive-grid { padding-bottom: 28px; }
/* The archive is text-led; preserve older graphics in the source, not the layout. */
.archive-grid > :is(article, div) > div:first-child { display: none; }
.archive-grid > :is(article, div) { background: transparent; border-color: #ffffff1a; }
.archive-grid .hover-lift:hover, .archive-grid .hover-lift:focus-within { transform: none; box-shadow: none; }

.about-layout { display: grid; gap: 32px; align-items: center; }
.about-layout > div { max-width: 64ch; }
.about-portrait { max-width: 260px; }
.about-portrait img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.about-portrait figcaption { margin-top: 12px; color: #b2aca7; font-size: 13px; }
.about-principles { display: grid; gap: 24px; margin-top: 40px; padding-top: 28px; border-top: 1px solid #ffffff1a; }
.about-principles dt { margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.about-principles dd { color: #c8c3bf; font-size: 16px; line-height: 1.7; max-width: 54ch; }
.journey-details { margin-top: 28px; }
.journey-details > summary { cursor: pointer; min-height: 44px; padding: 10px 0; color: #e5e2e1; }
.journey-details > summary > span { margin-left: 12px; color: #ffb693; }
.journey-list > div { padding: 18px 0; border-bottom: 1px solid #ffffff1a; }
.journey-list dt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-weight: 600; }
.journey-list dt span, .journey-list dd { color: #b2aca7; font-size: 14px; font-weight: 400; }
.journey-list dd { margin-top: 4px; }

/* Avoid cramped side-by-side service titles and descriptions. */
#experience .service-link { display: grid; grid-template-columns: 1fr auto; }
#experience .service-link > div:first-child { min-width: 0; }
#experience .service-link h4 { font-family: "Hanken Grotesk", sans-serif; font-size: 21px; line-height: 1.3; }
#experience .service-link > div:last-child { display: contents; }
#experience .service-link p { display: block; grid-column: 1; grid-row: 2; max-width: 45ch; padding-left: 56px; color: #c8c3bf; }
#experience .service-link > div:last-child > .icon { grid-column: 2; grid-row: 1; }
/* Restore the original boxed, numbered skills grid with square outer corners. */
#skills .hover-lift { border-radius: 0; }
footer h2 { text-align: center; font-size: clamp(20px, 4vw, 32px); }

@media (min-width: 640px) {
  .hero-proof { grid-template-columns: 1fr 1fr; align-items: center; }
  .hero-proof-detail { grid-column: 1 / -1; }
  .about-principles { grid-template-columns: 1fr 1fr; gap: 48px; }
}

@media (min-width: 768px) {
  .hero { padding-top: 64px; padding-bottom: 40px; }
  .about-layout { grid-template-columns: 1.6fr 1fr; gap: 64px; }
  .about-portrait { max-width: 320px; justify-self: end; }
}

@media (min-width: 1024px) {
  #mobile-nav, #mobile-nav.is-open, #mobile-nav[aria-hidden="false"] { display: none; }
  .hero-layout { grid-template-columns: 1.2fr 0.8fr; gap: 64px; }
  .hero-visual { display: block; min-width: 0; }
  .hero-visual img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
  .hero-visual figcaption { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: #b2aca7; }
  .hero-proof { grid-template-columns: 1fr 1fr 1.1fr; gap: 32px; margin-top: 48px; }
  .hero-proof-detail { grid-column: auto; border-left: 1px solid #ffffff1a; padding-left: 32px; }
}

.text-primary-container {
  color: #ff6b00;
}

.sr-only-focusable {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  left: auto;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

#mobile-nav[aria-hidden="false"] {
  display: flex;
}

button,
input,
textarea,
a {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(255, 107, 0, 0.6);
  outline-offset: 3px;
}

.bg-primary-container {
  background-color: #ff6b00;
}

.divider {
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

/* Mobile nav, hidden by default, toggled via js/main.js */
#mobile-nav {
  display: none;
}

#mobile-nav.is-open {
  display: flex;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Shared card hover pattern: projects, skills, certifications, GitHub strip */
.hover-lift {
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.hover-lift:hover,
.hover-lift:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

/* Honest disabled state for not-yet-launched project links */
.coming-soon {
  opacity: 0.65;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hover-lift:hover,
  .hover-lift:focus-within {
    transform: none;
  }
}
