:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --text: #111113;
  --muted: #64646b;
  --line: #dedee3;
  --accent: #0071e3;
  --accent-dark: #0058b9;
  --shadow: 0 28px 70px rgba(17, 17, 19, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(222, 222, 227, 0.72);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 180ms ease;
}

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

main {
  overflow: hidden;
}

.hero {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 84px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 56px;
}

.eyebrow,
.section-kicker,
.project-type,
.timeline-label,
.article-meta {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.8rem, 8vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-role {
  margin: 26px 0 0;
  max-width: 720px;
  color: #303034;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-copy {
  margin: 22px 0 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 1.14rem;
}

.hero-actions,
.contact-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

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

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

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.hero-panel {
  min-height: 500px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(222, 222, 227, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 250, 0.84)),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(0, 113, 227, 0.06) 24px);
  box-shadow: var(--shadow);
}

.signal-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.signal-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.main-signal strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.metric-row div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-row span {
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 800;
}

.metric-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.stack-preview,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-preview span,
.tag-list span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #303034;
  font-size: 0.88rem;
  font-weight: 700;
}

.intro-section,
.section,
.contact-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.intro-section {
  padding: 82px 0;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 56px;
  border-top: 1px solid var(--line);
}

.intro-section h2,
.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.intro-section p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.section {
  padding: 96px 0;
}

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

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

.writing-section {
  border-top: 1px solid var(--line);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 36px;
}

.split-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(17, 17, 19, 0.05);
}

.article-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.article-card p:not(.article-meta) {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.article-link {
  min-width: 92px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.article-link:hover {
  border-color: rgba(0, 113, 227, 0.32);
  background: #eef6ff;
  transform: translateY(-2px);
}

.project-card,
.skill-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(17, 17, 19, 0.05);
}

.project-visual {
  min-height: 320px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f0f2f5;
}

.browser-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.72);
}

.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa0a6;
}

.course-layout {
  min-height: 210px;
  display: grid;
  grid-template-columns: 96px 1fr;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.course-sidebar {
  background: #16181d;
}

.course-content {
  padding: 26px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.course-content span {
  height: 18px;
  border-radius: 999px;
  background: #d8e8ff;
}

.course-content span:nth-child(2) {
  width: 72%;
  background: #e2e2e7;
}

.course-content span:nth-child(3) {
  width: 48%;
  background: #e2e2e7;
}

.homelab {
  position: relative;
  align-items: center;
  background: #eef3f1;
}

.rack {
  width: min(270px, 86%);
  display: grid;
  gap: 12px;
}

.rack span {
  height: 54px;
  border-radius: 8px;
  background: #111113;
  box-shadow: inset 12px 0 0 #0071e3, inset -44px 0 0 #2bd17e;
}

.network-lines {
  width: min(330px, 92%);
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
}

.network-lines span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.12);
}

.project-body {
  padding: 26px;
}

.project-body h3,
.skill-card h3,
.timeline-item h3 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.project-body p:not(.project-type),
.skill-card p,
.timeline-item p:not(.timeline-label) {
  margin: 12px 0 20px;
  color: var(--muted);
}

.skill-section {
  border-top: 1px solid var(--line);
}

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

.skill-card {
  padding: 24px;
}

.skill-card p {
  margin-bottom: 0;
}

.profile-section {
  border-top: 1px solid var(--line);
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.12);
}

.contact-section {
  margin-bottom: 48px;
  padding: 72px;
  border-radius: var(--radius);
  background: #111113;
  color: #ffffff;
}

.contact-section .section-kicker {
  color: #7ab7ff;
}

.contact-section h2 {
  max-width: 850px;
}

.contact-section .button.secondary {
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer div:first-child {
  display: grid;
  gap: 3px;
}

.site-footer strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-weight: 700;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
}

.legal-hero {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.legal-hero p:last-child {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.legal-content {
  display: grid;
  gap: 16px;
  padding-top: 28px;
}

.legal-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(17, 17, 19, 0.04);
}

.legal-content h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.legal-content p {
  margin: 0;
  color: var(--muted);
}

.legal-content p + p {
  margin-top: 14px;
}

.legal-content a {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero,
  .intro-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-panel {
    min-height: 420px;
  }

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

  .split-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(100% - 24px, 1120px);
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
  }

  .nav-links {
    max-width: 250px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    font-size: 0.82rem;
  }

  .logo {
    width: 32px;
    height: 32px;
    font-size: 0.88rem;
  }

  .hero,
  .intro-section,
  .section,
  .contact-section {
    width: min(100% - 24px, 1120px);
  }

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

  .hero h1 {
    font-size: 3.55rem;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-panel,
  .project-visual {
    min-height: 300px;
    padding: 18px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .article-card {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 22px;
  }

  .article-link {
    width: 100%;
  }

  .intro-section,
  .section {
    padding: 64px 0;
  }

  .contact-section {
    padding: 42px 22px;
  }

  .site-footer {
    width: min(100% - 24px, 1120px);
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .legal-page {
    width: min(100% - 24px, 900px);
    padding: 54px 0 52px;
  }

  .legal-content article {
    padding: 22px;
  }
}
