:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --panel: rgba(255, 255, 255, 0.9);
  --blue: #0066cc;
  --green: #248a3d;
  --orange: #bf5b16;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --max: 1210px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max));
  height: 52px;
  margin: 12px auto 0;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(24px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
}

.brand strong {
  font-size: 13px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.header-action {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: var(--radius);
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 500;
}

.nav-links a:hover,
.header-action:hover {
  background: rgba(17, 17, 20, 0.06);
}

.header-action {
  color: #fff;
  background: var(--ink);
  font-weight: 700;
}

.header-action:hover {
  background: #2a2a30;
}

.section-band,
.section-block,
.site-footer {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(38px, 7vw, 86px);
  padding: clamp(58px, 7vw, 86px) 0 clamp(42px, 5vw, 64px);
  animation: pageIntro 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(52px, 6.1vw, 78px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  max-width: 920px;
  color: var(--muted);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

h2 span {
  color: var(--ink);
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.38;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 38px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(0, 102, 204, 0.18);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
  margin: 0;
}

.hero-stats div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.hero-stats dt {
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 700;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  position: absolute;
  inset: -22px 12px auto auto;
  width: 42%;
  height: 68%;
  border: 1px solid rgba(0, 102, 204, 0.14);
  border-radius: var(--radius);
  background: rgba(0, 102, 204, 0.05);
  content: "";
  transform: rotate(5deg);
}

.device-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 8px;
  height: 42px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d7d8dc;
}

.window-bar span:nth-child(1) {
  background: #ff5f57;
}

.window-bar span:nth-child(2) {
  background: #ffbd2e;
}

.window-bar span:nth-child(3) {
  background: #28c840;
}

.terminal-grid {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.social-profile {
  align-content: start;
}

.profile-cover {
  height: 150px;
  margin: 0 -20px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 102, 204, 0.18), transparent 34%),
    linear-gradient(135deg, #eef5ff, #f7f7f8 52%, #eff8f2);
}

.profile-head {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  margin-top: -68px;
  padding: 0 4px 10px;
}

.profile-head img {
  width: 138px;
  height: 138px;
  display: block;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  object-position: center 20%;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.profile-head-copy span,
.post-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-head-copy strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 31px;
  font-style: italic;
  line-height: 1.05;
}

.profile-head-copy p {
  margin: 0;
  color: #4f535c;
  font-size: 15px;
  line-height: 1.42;
}

.profile-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stack span {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.035);
}

.intro-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  padding: 20px max(16px, calc((100% - var(--max)) / 2));
  overflow-x: auto;
  border-block: 1px solid var(--line);
  background: #f5f5f7;
}

.intro-strip span {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #333840;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.section-block {
  padding: clamp(72px, 9vw, 118px) 0;
}

.reveal-section {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

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

@keyframes pageIntro {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.045);
}

.timeline-item.featured {
  padding: 28px;
  border: 1px solid rgba(0, 102, 204, 0.16);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.timeline-date {
  color: var(--muted);
  font-weight: 700;
}

.timeline-item p,
.project-card p,
.stack-column p,
.cv-copy p {
  color: #4f535c;
  font-size: 17px;
  line-height: 1.58;
}

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

.tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: #343842;
  font-size: 13px;
  font-weight: 600;
}

.split-section {
  border-top: 0;
}

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

.project-card {
  display: flex;
  min-height: 360px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  flex-direction: column;
  justify-content: flex-end;
}

.project-kicker {
  margin-bottom: 14px;
  color: #b35c00;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stack-section {
  border-top: 0;
}

.stack-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stack-column {
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.045);
}

.cv-section {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  align-items: center;
  gap: clamp(26px, 5vw, 64px);
  border-top: 0;
}

.cv-copy .secondary-button {
  margin-top: 12px;
}

.cv-preview {
  display: block;
  overflow: hidden;
  height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.cv-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: end;
  margin-bottom: 24px;
  padding: clamp(42px, 6vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: #f5f5f7;
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 102, 204, 0.28), transparent 34%),
    linear-gradient(135deg, #111114 0%, #1d1d1f 54%, #060607 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.site-footer h2 {
  max-width: 760px;
  margin-bottom: 18px;
  color: rgba(245, 245, 247, 0.62);
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.06;
}

.site-footer h2 span,
.cv-copy h2 span {
  color: var(--ink);
}

.site-footer h2 span {
  color: #f5f5f7;
}

.site-footer .eyebrow {
  color: #8ab4ff;
}

.footer-copy p:not(.eyebrow) {
  max-width: 600px;
  margin-bottom: 26px;
  color: rgba(245, 245, 247, 0.72);
  font-size: 19px;
  line-height: 1.48;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: var(--radius);
  color: #1d1d1f;
  background: #f5f5f7;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
}

address,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  font-style: normal;
}

.contact-grid a,
.contact-card {
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.contact-grid a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.contact-grid span {
  display: block;
  margin-bottom: 10px;
  color: rgba(245, 245, 247, 0.55);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-grid strong {
  display: block;
  color: #fff;
  font-size: 17px;
  line-height: 1.25;
}

@media (max-width: 940px) {
  .site-header {
    width: calc(100% - 20px);
  }

  .nav-links {
    display: none;
  }

  .hero,
  .cv-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: start;
  }

  .hero {
    padding-top: 48px;
  }

  .device-shell {
    min-height: 0;
  }

  .project-grid,
  .stack-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .section-band,
  .section-block,
  .site-footer {
    width: min(calc(100% - 24px), var(--max));
  }

  .site-footer {
    padding: 30px;
  }

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

  .contact-grid a,
  .contact-card {
    min-height: 86px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 54px);
  }

  h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .hero-lead {
    font-size: 18px;
  }

  .device-shell {
    min-height: 0;
  }

  .hero-visual::before {
    display: none;
  }

  .terminal-grid {
    padding: 18px;
  }

  .profile-cover {
    height: 118px;
    margin: -18px -18px 0;
  }

  .profile-head {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    margin-top: -54px;
  }

  .profile-head img {
    width: 108px;
    height: 108px;
  }

  .profile-head-copy strong {
    font-size: 24px;
  }

  .profile-head-copy p {
    font-size: 13px;
  }

  .profile-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .profile-stack span {
    min-height: 46px;
    font-size: 13px;
  }

  .timeline-item,
  .project-grid,
  .stack-layout {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stats div {
    padding: 13px 0;
  }

  .hero-stats dt {
    font-size: 22px;
  }

  .hero-stats dd {
    font-size: 12px;
  }

  .timeline-item.featured {
    padding: 22px;
  }

  .hero-actions a {
    width: 100%;
  }

  .cv-preview {
    height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal-section {
    opacity: 1 !important;
    transform: none !important;
  }
}
