:root {
  --bg: #f5f7fb;
  --bg-elev: #ffffff;
  --ink: #0b0f1a;
  --muted: #2f3b57;
  --accent: #2f6bff;
  --accent-2: #18b6a6;
  --stroke: rgba(16, 22, 42, 0.1);
  --shadow: 0 18px 50px rgba(16, 22, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --max-w: 1080px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.page {
  position: relative;
  overflow-x: hidden;
  min-height: auto;
}

.glow {
  position: fixed;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.18), transparent 60%);
  filter: blur(14px);
  z-index: 0;
  pointer-events: none;
}

.glow.secondary {
  background: radial-gradient(circle, rgba(24, 182, 166, 0.18), transparent 55%);
}

.glow.one {
  top: -15%;
  left: -10%;
}

.glow.two {
  right: -20%;
  top: 25%;
}

.glow.three {
  left: 10%;
  bottom: -25%;
}

header {
  position: relative;
  z-index: 2;
  padding: 18px 20px 0;
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 10px 20px;
  backdrop-filter: blur(12px);
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.95rem;
  color: var(--muted);
  margin-right: auto;
}

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

.pill {
  background: var(--accent);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.28);
}

main {
  position: relative;
  z-index: 1;
}

section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
  padding-top: 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 4vw, 4.3rem);
  line-height: 1.05;
  margin: 18px 0;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portrait-wrap {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.portrait {
  width: min(320px, 70vw);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(47, 107, 255, 0.18);
  box-shadow: 0 18px 40px rgba(16, 22, 42, 0.18);
  background: #ffffff;
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  color: var(--ink);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), #4d8bff);
  color: #ffffff;
  border: none;
  box-shadow: 0 18px 34px rgba(47, 107, 255, 0.3);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.experience .card-grid,
#projects .card-grid {
  grid-template-columns: 1fr;
}

.experience-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.experience-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: var(--bg-elev);
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
  display: grid;
  gap: 10px;
  min-height: 200px;
  box-shadow: var(--shadow);
}

#projects .card {
  min-height: 0;
  padding: 16px 18px;
  gap: 6px;
}

.card-link {
  color: inherit;
}

.card-link:hover {
  border-color: rgba(47, 107, 255, 0.35);
}

.doc-card {
  min-height: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.doc-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.doc-title {
  font-weight: 600;
  color: #1f2a44;
}

.card-url {
  margin-top: -6px;
  color: #0e4a45;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 0.8rem;
  background: rgba(47, 107, 255, 0.08);
}

.experience .tag {
  background: rgba(47, 107, 255, 0.16);
  border-color: rgba(47, 107, 255, 0.35);
  color: #1b2a52;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 14px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills span {
  display: inline-flex;
  align-items: center;
  background: rgba(24, 182, 166, 0.14);
  border: 1px solid rgba(24, 182, 166, 0.45);
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #1f2a44;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

.skills span:nth-child(3n + 1) {
  background: rgba(24, 182, 166, 0.14);
  border-color: rgba(24, 182, 166, 0.45);
  color: #0e4a45;
}

.skills span:nth-child(3n + 2) {
  background: rgba(24, 182, 166, 0.14);
  border-color: rgba(24, 182, 166, 0.45);
  color: #0e4a45;
}

.skills span:nth-child(3n + 3) {
  background: rgba(24, 182, 166, 0.14);
  border-color: rgba(24, 182, 166, 0.45);
  color: #0e4a45;
}

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

.timeline-item {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: var(--bg-elev);
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
}

.cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(140deg, rgba(47, 107, 255, 0.16), rgba(24, 182, 166, 0.12));
  padding: 24px;
  box-shadow: var(--shadow);
}

.cta h2 {
  white-space: nowrap;
}

footer {
  padding: 20px 20px 24px;
  color: var(--muted);
  text-align: center;
}

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

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

@media (max-width: 760px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 48px;
  }
}
