:root {
  --ink: #10212b;
  --muted: #5e6d76;
  --paper: #f5f2ea;
  --white: #ffffff;
  --teal: #0f7b78;
  --gold: #d99d2b;
  --coral: #d75a4a;
  --navy: #17364d;
  --line: rgba(16, 33, 43, 0.14);
  --shadow: 0 24px 70px rgba(16, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(245, 242, 234, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 12px 36px rgba(16, 33, 43, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--teal);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: center;
  gap: clamp(32px, 6vw, 92px);
  padding: 120px clamp(20px, 5vw, 72px) 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(15, 123, 120, 0.12), transparent 38%),
    radial-gradient(circle at 82% 20%, rgba(217, 157, 43, 0.2), transparent 28%),
    linear-gradient(180deg, transparent 70%, rgba(255, 255, 255, 0.44));
  pointer-events: none;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 14px 32px rgba(15, 123, 120, 0.22);
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

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

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.contact-strip span {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-visual {
  filter: drop-shadow(0 30px 54px rgba(16, 33, 43, 0.18));
}

.hero-photo {
  padding: 12px;
  border: 1px solid rgba(16, 33, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 36% center;
  border-radius: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 clamp(20px, 5vw, 72px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 170px;
  padding: 28px;
  background: var(--white);
}

.metric strong {
  display: block;
  margin-bottom: 12px;
  color: var(--coral);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(78px, 10vw, 130px) clamp(20px, 5vw, 72px);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: start;
}

.section-intro {
  position: sticky;
  top: 110px;
}

.section-intro p,
.section-heading p {
  max-width: 640px;
  color: var(--muted);
}

.skill-grid,
.project-grid,
.news-grid,
.education-grid,
.referee-grid {
  display: grid;
  gap: 18px;
}

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

.skill-card,
.education-card,
.referee,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.skill-card {
  padding: 28px;
}

.icon,
.project-card span,
.education-card span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-card p,
.timeline-panel p,
.timeline-panel li,
.education-card p,
.referee p {
  color: var(--muted);
}

.timeline-section {
  background: var(--ink);
  color: var(--white);
}

.timeline-section .eyebrow {
  color: #f0bd5a;
}

.timeline-section .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.timeline {
  margin-top: 50px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding: 0 0 30px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 207px;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.timeline-date {
  color: #f0bd5a;
  font-weight: 800;
}

.timeline-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.timeline-panel .company {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.timeline-panel ul {
  margin: 0;
  padding-left: 20px;
}

.timeline-panel li + li {
  margin-top: 10px;
}

.timeline-more {
  margin-top: 10px;
}

.timeline-more[hidden] {
  display: none;
}

.timeline-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid rgba(240, 189, 90, 0.52);
  border-radius: 8px;
  color: #f0bd5a;
  background: rgba(240, 189, 90, 0.08);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.timeline-toggle:hover {
  transform: translateY(-2px);
  border-color: #f0bd5a;
  background: rgba(240, 189, 90, 0.14);
}

.projects-section {
  background: var(--white);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-button:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 123, 120, 0.36);
  color: var(--teal);
}

.filter-button.active {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
}

.project-card {
  min-height: 320px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef4f2;
  border-bottom: 1px solid var(--line);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
}

.project-body h3 {
  margin-bottom: 0;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 123, 120, 0.36);
  box-shadow: 0 22px 50px rgba(16, 33, 43, 0.12);
}

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

.project-card.hidden {
  display: none;
}

.portfolio-link {
  margin-top: 28px;
}

.education-section {
  background:
    linear-gradient(90deg, rgba(15, 123, 120, 0.1), transparent),
    var(--paper);
}

.news-section {
  background:
    linear-gradient(135deg, rgba(217, 157, 43, 0.14), transparent 44%),
    var(--paper);
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
}

.news-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(16, 33, 43, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 123, 120, 0.36);
  box-shadow: 0 22px 50px rgba(16, 33, 43, 0.12);
}

.news-card span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.news-card h3 {
  margin-top: 14px;
}

.news-card p {
  margin-bottom: 22px;
  color: var(--muted);
}

.news-card strong {
  color: var(--teal);
}

.blog-page {
  background: var(--paper);
}

.blog-main {
  padding: 124px clamp(20px, 5vw, 72px) 70px;
}

.blog-article {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.blog-article h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.blog-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.blog-article h2 {
  margin-top: 38px;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.blog-article p,
.blog-article li {
  color: var(--muted);
}

.blog-article ul {
  padding-left: 20px;
}

.blog-article li + li {
  margin-top: 10px;
}

.blog-back {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--teal);
  font-weight: 900;
}

.education-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.education-card,
.referee {
  padding: 26px;
}

.contact-section {
  background: var(--navy);
  color: var(--white);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 34px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 123, 120, 0.88), rgba(16, 33, 43, 0.8));
}

.contact-panel h2 {
  max-width: 980px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.contact-panel .eyebrow {
  color: #f7c86d;
}

.referee-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.referee {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.referee a,
.referee span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: var(--paper);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  color: var(--teal);
}

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

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

@media (max-width: 980px) {
  .hero,
  .split,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-visual {
    max-width: 560px;
  }

  .metrics,
  .project-grid,
  .news-grid,
  .education-grid,
  .referee-grid {
    grid-template-columns: 1fr;
  }

  .section-intro {
    position: static;
  }

  .project-card {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 78px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 13px 10px;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.6rem);
  }

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

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

  .timeline-item::before {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

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