:root {
  --ink: #14211f;
  --muted: #58706b;
  --paper: #fbfaf4;
  --surface: #ffffff;
  --line: rgba(20, 33, 31, 0.12);
  --moss: #2f6f5e;
  --leaf: #87b26f;
  --clay: #b65f45;
  --sun: #f3c86a;
  --sky: #dcefed;
  --shadow: 0 24px 70px rgba(20, 33, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(135, 178, 111, 0.2), transparent 32rem),
    linear-gradient(180deg, #f8f3e6 0%, var(--paper) 42%, #eef6f2 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  background: rgba(251, 250, 244, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(20, 33, 31, 0.07);
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav a,
.header-action,
.button,
.contact-links a {
  text-decoration: none;
}

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

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.header-action,
.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.header-action {
  padding: 0.65rem 1rem;
  color: var(--surface);
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(20rem, 0.98fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  min-height: calc(100vh - 4.9rem);
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1rem, 6vw, 5rem) 3rem;
}

.eyebrow,
.section-kicker,
.date,
.year {
  margin: 0 0 0.8rem;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.02;
}

h1 {
  max-width: 12ch;
  font-size: clamp(4.1rem, 13vw, 8.8rem);
}

h2 {
  max-width: 13ch;
  font-size: clamp(2.45rem, 6vw, 5rem);
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  line-height: 1.28;
}

.hero-lede {
  max-width: 40rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  padding: 0.8rem 1.15rem;
}

.button.primary {
  color: var(--surface);
  background: var(--moss);
}

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

.portrait-stage {
  position: relative;
  display: grid;
  min-height: min(45rem, 78vh);
  place-items: center;
  isolation: isolate;
}

.map-rings {
  position: absolute;
  width: min(92vw, 34rem);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle, transparent 0 3.1rem, rgba(47, 111, 94, 0.13) 3.15rem 3.22rem),
    conic-gradient(from 20deg, rgba(243, 200, 106, 0.75), rgba(220, 239, 237, 0.7), rgba(135, 178, 111, 0.65), rgba(243, 200, 106, 0.75));
  filter: blur(0.2px);
  animation: slow-spin 26s linear infinite;
  z-index: -2;
}

.portrait-card {
  position: relative;
  width: min(76vw, 25rem);
  margin: 0;
  border: 10px solid rgba(255, 255, 255, 0.86);
  border-radius: 38% 62% 49% 51% / 48% 39% 61% 52%;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-origin: center bottom;
  animation: portrait-float 5.8s ease-in-out infinite;
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.32), transparent 32%),
    radial-gradient(circle at 52% 28%, rgba(255, 237, 185, 0.2), transparent 34%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.portrait-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 52% 52%;
  filter: saturate(1.12) contrast(0.96) brightness(1.04);
}

.welcome-bubble {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  max-width: 12.5rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(20, 33, 31, 0.12);
  border-radius: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(20, 33, 31, 0.12);
  font-size: 0.92rem;
  font-weight: 800;
  animation: bubble-pop 4s ease-in-out infinite;
}

.floating-tag {
  position: absolute;
  padding: 0.58rem 0.82rem;
  border: 1px solid rgba(20, 33, 31, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(20, 33, 31, 0.11);
  font-size: 0.85rem;
  font-weight: 800;
}

.tag-one {
  top: 14%;
  left: 8%;
  animation: drift 6s ease-in-out infinite;
}

.tag-two {
  right: 4%;
  top: 28%;
  animation: drift 7s ease-in-out 800ms infinite reverse;
}

.tag-three {
  bottom: 16%;
  left: 1%;
  animation: drift 6.5s ease-in-out 420ms infinite;
}

section:not(.hero) {
  padding: clamp(4rem, 9vw, 7.5rem) clamp(1rem, 6vw, 5rem);
}

.intro-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.intro-copy {
  max-width: 52rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.timeline-section,
.projects-section,
.highlights-section {
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--line);
}

.timeline-item,
.project-card,
.highlight-columns > div {
  background: rgba(255, 255, 255, 0.68);
}

.timeline-item {
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.meta {
  margin: 0 0 0.9rem;
  color: var(--moss);
  font-weight: 800;
}

.timeline-item p:last-child,
.project-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.project-card {
  min-height: 18rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
}

.project-card.featured {
  grid-column: span 2;
  color: #fffaf0;
  background:
    linear-gradient(145deg, rgba(20, 33, 31, 0.82), rgba(47, 111, 94, 0.88)),
    url("assets/niruta-portrait.jpg") center / cover;
  background-blend-mode: multiply;
}

.project-card.featured .year,
.project-card.featured p:last-child {
  color: rgba(255, 250, 240, 0.82);
}

.highlight-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr;
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-columns > div {
  padding: clamp(1.1rem, 3vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
}

.clean-list,
.skill-cloud {
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.clean-list li {
  padding: 0.72rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.skill-cloud li {
  padding: 0.52rem 0.72rem;
  border: 1px solid rgba(47, 111, 94, 0.18);
  border-radius: 999px;
  background: rgba(220, 239, 237, 0.75);
  color: var(--moss);
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-section {
  color: #fffaf0;
  background: var(--ink);
}

.contact-section .section-kicker {
  color: var(--sun);
}

.contact-section h2 {
  max-width: 11ch;
}

.contact-links {
  display: grid;
  gap: 0.8rem;
}

.contact-links a {
  display: flex;
  min-height: 4rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 250, 240, 0.17);
  border-radius: 1rem;
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

@keyframes slow-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes portrait-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-1rem) rotate(1.2deg);
  }
}

@keyframes bubble-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-0.35rem) scale(1.03);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0.6rem, -0.8rem, 0);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .hero,
  .intro-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

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

  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.85rem 1rem;
  }

  .header-action {
    min-height: 2.4rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3.5rem, 19vw, 5.8rem);
  }

  .portrait-stage {
    min-height: 31rem;
  }

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

  .project-card.featured {
    grid-column: auto;
  }

  .floating-tag {
    font-size: 0.76rem;
  }

  .tag-three {
    left: 6%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
