:root {
  --bg: #ffffff;
  --surface: #f7f7f5;
  --text: #161616;
  --muted: #6b6b6b;
  --line: #deded9;
  --accent: #111111;
  --max-width: 1080px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(222, 222, 217, 0.8);
  backdrop-filter: blur(10px);
}

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

.brand {
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}

.brand span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--text);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 34px;
  height: 34px;
}

.nav-toggle span {
  display: block;
  width: 21px;
  height: 1.5px;
  background: var(--text);
  margin: 4px auto;
}

.hero {
  padding: 132px 0 108px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  margin-bottom: 17px;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3.2rem, 9vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 760;
}

.hero-copy {
  max-width: 680px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--text);
  border-radius: 7px;
  font-size: 0.9rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

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

.button-light {
  background: white;
  color: var(--text);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-links a:hover,
.text-button:hover {
  color: var(--text);
}

.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

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

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 42px;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.section-heading h2 {
  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 72px;
}

.about-grid p {
  max-width: 680px;
  color: #333;
  font-size: 1.03rem;
}

.about-grid p + p {
  margin-top: 17px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  height: fit-content;
}

.facts div {
  background: var(--bg);
  padding: 17px;
}

.facts span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 4px;
}

.facts strong {
  font-size: 1.08rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.79rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item h3,
.project-card h3,
.skills-grid h3,
.education-card h3 {
  font-size: 1.06rem;
  letter-spacing: -0.02em;
}

.timeline-item ul {
  margin-top: 11px;
  padding-left: 18px;
  color: #444;
}

.timeline-item li + li {
  margin-top: 7px;
}

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

.project-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 285px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #bcbcb6;
}

.project-top,
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-number {
  color: var(--muted);
  font-size: 0.78rem;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--muted);
  font-size: 0.7rem;
}

.project-card h3 {
  margin-top: 45px;
}

.project-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-footer {
  margin-top: auto;
  padding-top: 23px;
  color: var(--muted);
  font-size: 0.72rem;
}

.project-footer a {
  color: var(--text);
  white-space: nowrap;
}

.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.skills-grid > div {
  padding: 25px 18px 25px 0;
  border-bottom: 1px solid var(--line);
}

.skills-grid > div:nth-child(odd) {
  padding-right: 35px;
  border-right: 1px solid var(--line);
}

.skills-grid > div:nth-child(even) {
  padding-left: 35px;
}

.skills-grid p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.education-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.education-card p,
.coursework {
  color: var(--muted);
  margin-top: 7px;
  font-size: 0.9rem;
}

.education-card strong {
  white-space: nowrap;
}

.coursework {
  margin-top: 20px;
}

.achievement-list {
  border-top: 1px solid var(--line);
}

.achievement {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 15px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.achievement > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.achievement p {
  color: #363636;
}

.contact-box {
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-box h2 {
  max-width: 700px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.contact-box > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  margin-top: 15px;
}

.footer {
  padding: 30px 0 50px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.76rem;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: white;
  padding: 10px 15px;
  border-radius: 7px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 820px) {
  .hero {
    padding: 95px 0 78px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 62px;
    background: white;
    border: 1px solid var(--line);
    padding: 17px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

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

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

  .facts {
    max-width: 390px;
  }

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

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

  .skills-grid > div:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .skills-grid > div:nth-child(even) {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .hero h1 {
    font-size: clamp(3rem, 17vw, 5rem);
  }

  .section {
    padding: 70px 0;
  }

  .contact-box {
    padding: 28px;
  }

  .footer {
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .hero-links,
  .contact-box,
  .footer,
  .toast {
    display: none !important;
  }

  .hero {
    padding: 30px 0;
  }

  .section {
    padding: 25px 0;
  }

  body {
    font-size: 11pt;
  }
}

