:root {
  --ink: #0a1628;
  --navy: #163156;
  --steel: #2a5f86;
  --muted: #5c6b7e;
  --line: rgba(22, 49, 86, 0.14);
  --paper: #f2f5f9;
  --paper-2: #e4ebf3;
  --sand: #d6b56d;
  --white: #ffffff;
  --max: 1120px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Figtree", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #c5d6e8 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 5%, #d9e4ef 0%, transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 45%, #dfe7f0 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--sand));
  box-shadow: 0 0 18px rgba(214, 181, 109, 0.5);
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.22;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(42, 95, 134, 0.35) 0%, transparent 65%);
  filter: blur(10px);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: rgba(242, 245, 249, 0.78);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.logo-avatar {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.24);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav-cta {
  color: var(--white) !important;
  background: var(--navy);
  padding: 0.55rem 1rem;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-cta:hover {
  background: var(--steel);
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem;
}

.menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  min-height: calc(100svh - var(--header-h));
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem)
    clamp(3rem, 7vw, 5rem);
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.hero-name {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.hero-lead {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-stats {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 38rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  backdrop-filter: blur(8px);
}

.stat-number {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy);
}

.stat-label {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.type-rotator {
  display: block;
  margin-top: 0.65rem;
  min-height: 1.6rem;
  font-weight: 600;
  color: var(--navy);
}

.type-rotator::after {
  content: "|";
  margin-left: 0.2rem;
  color: var(--sand);
  animation: blink 0.9s step-end infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--steel);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(22, 49, 86, 0.28);
  color: var(--navy);
}

.btn-ghost:hover {
  border-color: var(--navy);
  background: rgba(255, 255, 255, 0.45);
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 440px);
}

.hero-photo-frame {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #153153 0%, #2a5f86 100%);
  border-radius: 1.1rem;
  box-shadow: 0 34px 70px rgba(10, 22, 40, 0.26);
  animation: float-photo 7s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: inherit;
  pointer-events: none;
}

.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.28), transparent 34%);
  pointer-events: none;
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  mix-blend-mode: normal;
}

.hero-badge {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fcff;
  background: rgba(10, 22, 40, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.badge-one {
  top: 1rem;
  left: -1.1rem;
}

.badge-two {
  right: -1rem;
  bottom: 1.4rem;
}

.hero-orb {
  position: absolute;
  z-index: 1;
  width: 70%;
  height: 70%;
  right: -12%;
  bottom: -10%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(214, 181, 109, 0.45) 0%,
    rgba(42, 95, 134, 0.2) 45%,
    transparent 70%
  );
  filter: blur(8px);
  animation: pulse-orb 6s ease-in-out infinite;
}

@keyframes float-photo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-orb {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  max-width: 36rem;
}

.section-head h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.15;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 0.85rem;
  background: linear-gradient(90deg, var(--navy), var(--sand));
  transform-origin: left;
  animation: draw-rule 0.9s var(--ease) both;
}

.section-head p {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

@keyframes draw-rule {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Experience */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.job {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.job:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.job-dates {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--steel);
  letter-spacing: 0.02em;
}

.job-body h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.job-company {
  margin: 0.35rem 0 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.job-body > p:last-child,
.job-body li {
  color: var(--muted);
}

.job-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.job-body li {
  position: relative;
  padding-left: 1.1rem;
}

.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--sand);
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.edu-item {
  padding-top: 0.25rem;
}

.edu-dates {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--steel);
  margin-bottom: 0.55rem;
}

.edu-item h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.edu-school {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: var(--navy);
}

.edu-tracks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1rem;
}

.edu-tracks li {
  font-size: 0.92rem;
  color: var(--muted);
  position: relative;
  padding-left: 0.85rem;
}

.edu-tracks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--steel);
}

/* Skills */
.skills-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.skill-focus {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-focus li {
  position: relative;
  padding-left: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}

.skill-focus li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--navy);
}

.tech-label {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.tech-list {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--muted);
  font-weight: 500;
}

/* Contact */
.contact {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 2px solid var(--navy);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

a.contact-item:hover {
  transform: translateY(-3px);
  border-color: var(--sand);
}

.contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.contact-value {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: break-word;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    align-items: start;
    padding-top: 2rem;
  }

  .hero-visual {
    order: -1;
    justify-self: start;
    width: min(100%, 340px);
  }

  .job {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .edu-grid,
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .menu-btn {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(242, 245, 249, 0.96);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .badge-one,
  .badge-two {
    font-size: 0.68rem;
  }

  .badge-one {
    left: 0.5rem;
  }

  .badge-two {
    right: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-photo-frame,
  .hero-orb,
  .section-head h2::after {
    animation: none;
  }

  .type-rotator::after {
    animation: none;
  }
}
