:root {
  --bg: #fafafa;
  --bg-soft: #f1f5f9;
  --text: #09090b;
  --muted: #52525b;
  --line: #e4e4e7;
  --accent: #2563eb;
  --accent-dark: #18181b;
  --accent-warm: #0f766e;
  --accent-pale: #e8ecf0;
  --card: #ffffff;
  --shadow: 0 22px 52px rgba(9, 9, 11, 0.12);
  --shadow-soft: 0 12px 28px rgba(9, 9, 11, 0.07);
  --radius: 8px;
  --font-main: "Archivo", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --font-display: "Space Grotesk", "Archivo", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(228, 228, 231, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228, 228, 231, 0.42) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.narrow {
  max-width: 820px;
}

.section {
  padding: 96px 0;
  scroll-margin-top: 104px;
}

.soft {
  background: rgba(241, 245, 249, 0.92);
  border-block: 1px solid rgba(228, 228, 231, 0.72);
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(228, 228, 231, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 0 24px;
}

.logo {
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  font-family: var(--font-display);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

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

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 128px 0 104px;
  background: transparent;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(296px, 0.7fr);
  align-items: center;
  gap: 64px;
}

.hero-grid > *,
.about-grid > *,
.projects-grid > *,
.experience-card > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero h2 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.15rem, 4.5vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero h2 span {
  color: var(--accent);
  font-size: 1.12em;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-note {
  display: inline-flex;
  max-width: 680px;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  color: #1d4ed8;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.4;
}

.button-row,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin: 32px 0 0;
}

.hero-metrics div {
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero-metrics dt {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

.hero-metrics dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button:focus-visible,
.nav-menu a:focus-visible,
.logo:focus-visible,
.personal-details a:focus-visible,
.email-copy:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 4px;
}

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

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}

.button.small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.hero-panel,
.focus-summary {
  display: grid;
  gap: 24px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  align-self: end;
  transform: translateY(24px);
  border-top: 4px solid var(--accent);
}

.hero-panel h3 {
  margin-bottom: 2px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.focus-summary {
  background: #f8fafc;
}

.hero-panel strong,
.focus-summary strong {
  display: block;
  max-width: 320px;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1.28;
}

.panel-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-stats,
.learning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mini-stats span,
.learning-list span {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.section h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section p {
  max-width: 680px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.experience-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card {
  padding: 32px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover,
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.38);
}

.card h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.card p {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 64px;
  align-items: start;
}

.personal-details {
  display: grid;
  gap: 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.personal-details.compact {
  margin: 0;
}

.personal-details li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.personal-details span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent-pale);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.personal-details a {
  color: var(--accent-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.personal-details a:hover,
.email-copy:hover {
  color: var(--accent);
}

.email-copy {
  display: inline;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email-copy.copied {
  color: var(--accent);
}

.copy-status {
  position: absolute;
  left: 46px;
  top: calc(100% + 2px);
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.project-card img {
  width: 100%;
  height: 264px;
  object-fit: cover;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  transition: transform 420ms ease, filter 420ms ease;
}

.project-card:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.025);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 32px;
}

.project-topline {
  margin-bottom: 16px;
}

.project-topline h3 {
  margin-bottom: 8px;
  font-size: 1.28rem;
  line-height: 1.25;
}

.project-topline span,
.meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.project-tags span {
  padding: 6px 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-content h4 {
  margin: 24px 0 8px;
  font-size: 0.96rem;
}

.project-content ul,
.experience-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.project-content li,
.experience-card li {
  margin-bottom: 8px;
}

.project-content li:last-child,
.experience-card li:last-child {
  margin-bottom: 0;
}

.project-actions {
  margin-top: auto;
  padding-top: 24px;
}

.timeline {
  display: grid;
  gap: 24px;
}

.experience-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) 1fr;
  gap: 32px;
  padding: 32px;
}

.experience-card h3 {
  margin-bottom: 8px;
  line-height: 1.28;
}

.meta {
  margin-bottom: 0;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cta-band p {
  margin-bottom: 0;
}

.learning-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.site-footer {
  padding: 32px 0;
  background: transparent;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.job-hero {
  min-height: auto;
  padding-top: 128px;
  padding-bottom: 80px;
}

.job-hero-grid,
.job-workspace {
  display: grid;
  gap: 32px;
}

.job-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
}

.job-hero h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.95;
}

.job-hero p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.job-search-panel,
.source-panel,
.daily-rhythm {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.job-search-panel {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.job-search-panel label,
.application-form label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.job-search-panel input[type="text"],
.application-form input,
.application-form select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  background: #ffffff;
}

.job-search-panel input:focus,
.application-form input:focus,
.application-form select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.job-workspace {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.source-panel,
.daily-rhythm {
  padding: 28px;
}

.application-panel {
  grid-row: span 2;
}

.quick-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-source-grid button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  text-align: left;
  background: var(--accent-pale);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.quick-source-grid button:hover {
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.quick-source-grid span,
.job-source-links small,
.application-list small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.job-source-links,
.application-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-source-links a,
.application-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.job-source-links span:first-child,
.application-list span {
  display: grid;
  gap: 2px;
}

.job-source-links span[aria-hidden="true"],
.application-list a {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.application-form {
  display: grid;
  gap: 12px;
}

.application-form .button {
  margin-top: 8px;
  cursor: pointer;
}

.tracker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 16px;
}

.tracker-heading h3 {
  margin: 0;
}

.empty-state {
  color: var(--muted);
}

.daily-rhythm {
  background: var(--text);
  color: #ffffff;
}

.daily-rhythm .eyebrow,
.daily-rhythm h2 {
  color: #ffffff;
}

.daily-rhythm ol {
  margin: 0;
  padding-left: 22px;
}

.daily-rhythm li {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.daily-rhythm li:last-child {
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .projects-grid,
  .experience-card,
  .contact-grid,
  .job-hero-grid,
  .job-workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 88px 0;
  }

  .hero-panel {
    align-self: auto;
    transform: none;
  }

  .hero-grid,
  .about-grid {
    gap: 48px;
  }

  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .application-panel {
    grid-row: auto;
  }

  .section {
    padding: 80px 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .section {
    padding: 72px 0;
  }

  .site-header {
    top: 8px;
    width: min(100% - 24px, 1120px);
    border-radius: var(--radius);
  }

  .nav {
    min-height: 64px;
    padding: 0 16px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    display: block;
    padding: 16px;
  }

  .hero {
    padding: 88px 0 72px;
  }

  h1 {
    margin-bottom: 16px;
    font-size: clamp(3.25rem, 15vw, 4.5rem);
  }

  .hero h2 {
    font-size: clamp(1.75rem, 8vw, 2.15rem);
    line-height: 1.12;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-copy {
    width: 100%;
    max-width: calc(100dvw - 32px);
  }

  .hero h2 {
    margin-bottom: 24px;
    max-width: 100%;
    font-size: clamp(1.45rem, 6.6vw, 1.8rem);
    line-height: 1.16;
  }

  .hero p:not(.eyebrow) {
    max-width: 100%;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }

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

  .hero-panel,
  .focus-summary,
  .card,
  .project-content,
  .experience-card,
  .job-search-panel,
  .source-panel,
  .daily-rhythm {
    padding: 24px;
    border-radius: var(--radius);
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .button-row,
  .project-actions {
    flex-direction: column;
    gap: 12px;
  }

  .button {
    width: 100%;
  }

  .card-grid.four {
    grid-template-columns: 1fr;
  }

  .quick-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .project-card img {
    height: 216px;
  }

  .cta-band {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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

@media (max-width: 520px) {
  .container,
  .site-header {
    width: calc(100% - 32px);
    max-width: 358px;
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (max-width: 460px) {

  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 3.4rem);
  }

  .hero h2 {
    font-size: clamp(1.35rem, 6.2vw, 1.55rem);
  }

  .hero-copy {
    max-width: 358px;
  }

  .project-card img {
    height: 192px;
  }

  .personal-details li {
    grid-template-columns: 32px 1fr;
  }

  .personal-details span[aria-hidden="true"] {
    width: 32px;
    height: 32px;
  }

  .quick-source-grid {
    grid-template-columns: 1fr;
  }

  .job-source-links a,
  .application-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}
