:root {
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --surface-muted: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d8e0ea;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.10);
  --radius: 26px;
  --radius-sm: 16px;
  --wrap: min(1120px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(15, 23, 42, 0.08), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 48%, #e2e8f0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 4px;
  border-radius: 10px;
}

main:focus {
  outline: none;
}

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

ul {
  padding-left: 1.15rem;
}

li + li {
  margin-top: 0.45rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: white;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  z-index: 20;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid rgba(216, 224, 234, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--text), var(--accent));
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  padding: 0.55rem 0;
}

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

.hero {
  padding-top: 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow,
.section-kicker,
.card-date,
.project-meta,
.education-list span {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  align-items: center;
}

.hero-eyebrow span {
  white-space: nowrap;
}

.hero-eyebrow span + span::before {
  content: "·";
  margin-right: 0.65rem;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.1rem;
  font-size: clamp(3.2rem, 8vw, 6.75rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.headline {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.cta-row,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

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

.button.primary {
  color: white;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
}

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

.button.secondary {
  color: var(--text);
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.12);
}

.profile-card,
.timeline-card,
.card,
.project-card,
.activity-card,
.contact-card,
.skills-panel > div {
  background: var(--surface-muted);
  border: 1px solid rgba(216, 224, 234, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 1.35rem;
}

.profile-initials {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--text));
  font-size: 1.35rem;
  font-weight: 800;
}

.profile-card h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.profile-card dl {
  margin-bottom: 0;
}

.profile-card dl > div {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.profile-card dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-card dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.summary-section,
.surface {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.72));
  border-block: 1px solid rgba(216, 224, 234, 0.9);
}

.two-column {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 2.5rem;
  align-items: start;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2,
.two-column h2,
.contact-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.summary-text,
.contact-card p {
  color: var(--muted);
  font-size: 1.08rem;
}

.timeline {
  display: grid;
  gap: 1.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.timeline-date {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.timeline-card,
.card,
.project-card,
.activity-card,
.skills-panel > div {
  padding: 1.45rem;
}

.timeline-card h3,
.card h3,
.project-card h3,
.education-list h3,
.skills-panel h3 {
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.timeline-card ul,
.project-card ul,
.activity-card ul {
  margin-bottom: 0;
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

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

.skills-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.skills-panel h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.skills-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.card p,
.project-card p,
.education-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.project-card .text-link {
  margin-top: auto;
  padding-top: 1.2rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.education-list {
  display: grid;
  gap: 1rem;
}

.education-list article {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.education-list article:first-child {
  border-top: 1px solid var(--border);
}

.education-list h3 {
  margin: 0.35rem 0;
}

.contact-section {
  padding-top: 48px;
}

.contact-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.contact-actions {
  justify-content: center;
}

.footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer p {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 122px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 1rem 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 0.35rem 0.9rem;
  }

  .hero-grid,
  .two-column,
  .timeline-item,
  .project-grid,
  .skills-panel {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
    scroll-margin-top: 122px;
  }

  .hero {
    padding-top: 64px;
  }
}

@media (max-width: 560px) {
  :root {
    --wrap: min(100% - 28px, 1120px);
  }

  html {
    scroll-padding-top: 138px;
  }

  body {
    background-attachment: scroll;
  }

  h1 {
    font-size: clamp(2.65rem, 18vw, 4rem);
  }

  .hero-eyebrow {
    letter-spacing: 0.09em;
  }

  .button {
    width: 100%;
  }

  .profile-card,
  .timeline-card,
  .card,
  .project-card,
  .activity-card,
  .contact-card,
  .skills-panel > div {
    border-radius: var(--radius-sm);
  }
}

@media print {
  html {
    scroll-padding-top: 0;
  }

  body {
    background: #ffffff;
    color: #111827;
  }

  body::before {
    display: none;
  }

  .site-header,
  .cta-row,
  .contact-section,
  .footer,
  .skip-link {
    display: none;
  }

  .section,
  .hero {
    padding: 22px 0;
  }

  .profile-card,
  .timeline-card,
  .card,
  .project-card,
  .activity-card,
  .skills-panel > div {
    border: 1px solid #d1d5db;
    box-shadow: none;
    break-inside: avoid;
  }

  .timeline-item {
    grid-template-columns: 220px 1fr;
  }

  .timeline-date {
    white-space: nowrap;
    font-size: 0.82rem;
  }

  a {
    color: #111827;
  }
}
