:root {
  --ink: #0d0d0d;
  --muted: #5f5650;
  --paper: #f8f7f4;
  --warm: #ded2c8;
  --sand: #cdb9aa;
  --soft: #efede7;
  --line: rgba(13, 13, 13, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

@media (prefers-reduced-motion: no-preference) {
  body {
    scroll-behavior: smooth;
  }
}

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

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.9;
}

h1 {
  font-size: clamp(4.5rem, 11vw, 9.4rem);
  margin-bottom: 1.4rem;
}

h2 {
  font-size: clamp(3.4rem, 7vw, 6.6rem);
  margin-bottom: 1.3rem;
}

h3 {
  margin: 1.3rem 0 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  font-style: italic;
  font-weight: 700;
}

p {
  max-width: 690px;
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.35;
}

.section-pad {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 8rem) 0;
}

.section-band {
  position: relative;
  overflow: hidden;
}

.beige-band {
  background: var(--warm);
}

.portfolio-nav {
  padding: 1rem 0;
  background: rgba(248, 247, 244, 0.82);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 100%;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}

.portfolio-nav.nav-scrolled {
  padding: 0.6rem 0;
  box-shadow: 0 10px 30px rgba(41, 34, 28, 0.08);
}

.navbar-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  color: var(--ink);
}

.nav-link {
  color: var(--ink);
  font-weight: 600;
}

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

.hero {
  min-height: 100vh;
  padding-top: 5.5rem;
  background:
    linear-gradient(90deg, var(--warm) 0 12%, transparent 12%),
    var(--paper);
}

.section-kicker {
  margin-bottom: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.hero-text {
  max-width: 530px;
  margin-bottom: 2rem;
}

.hero-note {
  max-width: 500px;
  margin-top: -0.8rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.btn {
  border-radius: 0;
  padding: 0.85rem 1.45rem;
  font-weight: 700;
}

.portrait-arch {
  position: relative;
  width: min(440px, 92vw);
  aspect-ratio: 0.82;
  padding: 1.35rem;
  border-radius: 48% 48% 0 0;
  background: var(--warm);
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out;
}

.portrait-arch::before {
  content: "";
  position: absolute;
  inset: 3.1rem 2rem 2rem;
  border: 1.5px solid var(--line);
  border-radius: 50% 50% 0 0;
}

.portrait-arch img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  border-radius: 50% 50% 0 0;
}

.spark,
.circle-line {
  position: absolute;
  pointer-events: none;
}

.spark::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(45deg);
}

.spark-top {
  right: 4%;
  top: 11%;
}

.spark-top::before {
  width: 10px;
  height: 10px;
}

.about {
  background: linear-gradient(90deg, var(--warm) 0 12%, transparent 12%), var(--paper);
}

.oval-photo {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 50% 50% 42% 42%;
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out;
}

.oval-photo::before {
  content: "";
  position: absolute;
  inset: -1rem;
  border: 1px solid var(--line);
  border-radius: inherit;
}

.oval-photo img {
  width: 100%;
  aspect-ratio: 0.76;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
}

.timeline {
  display: grid;
  gap: 1.7rem;
}

.timeline article {
  position: relative;
  padding-left: 4.6rem;
}

.timeline h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-style: normal;
  font-weight: 500;
}

.timeline p,
.timeline small {
  display: block;
  margin: 0;
  color: var(--ink);
}

.cap-icon {
  position: absolute;
  left: 0;
  top: 0.25rem;
  font-size: 1.7rem;
}

.study-collage {
  position: relative;
  min-height: 420px;
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out;
}

.study-collage .shape {
  position: absolute;
  background: var(--soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.shape-one {
  right: 6%;
  top: 0;
  width: 70%;
  height: 48%;
  border-radius: 0 120px 0 0;
}

.shape-two {
  right: 0;
  bottom: 0;
  width: 72%;
  height: 52%;
  border-radius: 120px 0 0 0;
}

.study-collage img {
  position: absolute;
  right: 9%;
  bottom: 4%;
  z-index: 2;
  width: 64%;
  height: 78%;
  object-fit: cover;
  object-position: center top;
  border-radius: 140px 140px 0 0;
}

.academic {
  background: linear-gradient(180deg, var(--paper) 0 50%, var(--warm) 50% 100%);
}

.device-card {
  min-height: 380px;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: var(--soft);
  border: 1px solid rgba(13, 13, 13, 0.22);
  box-shadow: 18px 18px 0 rgba(205, 185, 170, 0.7);
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out, box-shadow 0.35s ease;
}

.section-in-view .device-card {
  box-shadow: 12px 12px 0 rgba(205, 185, 170, 0.85);
}

.device-card span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.device-card strong {
  max-width: 420px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  font-weight: 500;
  line-height: 0.94;
}

.experience {
  background:
    linear-gradient(90deg, var(--warm) 0 28%, transparent 28%),
    var(--paper);
}

.experience-panel {
  position: relative;
  overflow: hidden;
  background: var(--soft);
  padding: clamp(2rem, 5vw, 4.2rem);
}

.experience-date {
  margin-top: -0.3rem;
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.monogram {
  position: relative;
  isolation: isolate;
  width: min(430px, 100%);
  min-height: 310px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  text-align: center;
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out;
}

.monogram::before {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(222, 210, 200, 0.38) 58%, transparent 72%);
  border-radius: 50%;
  filter: blur(2px);
}

.monogram::after {
  content: "";
  position: absolute;
  inset: 22% 4%;
  z-index: -1;
  border-top: 1px solid rgba(13, 13, 13, 0.18);
  border-bottom: 1px solid rgba(13, 13, 13, 0.12);
  transform: rotate(-6deg);
}

.mono-letter {
  position: absolute;
  color: rgba(13, 13, 13, 0.72);
  font-size: clamp(8rem, 16vw, 14rem);
  font-weight: 500;
  line-height: 0.78;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 42px rgba(67, 55, 45, 0.12);
}

.mono-n {
  transform: translateX(-20%) rotate(-3deg);
}

.mono-r {
  color: rgba(13, 13, 13, 0.52);
  transform: translateX(25%) rotate(3deg);
}

.monogram small {
  position: absolute;
  bottom: 18%;
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-in-view .mono-n {
  animation: monogramN 0.9s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.section-in-view .mono-r {
  animation: monogramR 0.9s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes monogramN {
  from {
    opacity: 0;
    transform: translateX(-32%) rotate(-7deg);
  }

  to {
    opacity: 1;
    transform: translateX(-20%) rotate(-3deg);
  }
}

@keyframes monogramR {
  from {
    opacity: 0;
    transform: translateX(38%) rotate(7deg);
  }

  to {
    opacity: 1;
    transform: translateX(25%) rotate(3deg);
  }
}

.skills {
  background: var(--paper);
}

.skill-list {
  display: grid;
  gap: 0.95rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.skill-list li {
  position: relative;
  padding-left: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-style: italic;
}

.skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sand);
}

.skills-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 520px);
  min-height: 410px;
  margin: 0 auto;
  padding: clamp(2rem, 4.5vw, 3.6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.82) 0%, rgba(239, 237, 231, 0.92) 36%, rgba(222, 210, 200, 0.88) 100%),
    var(--soft);
  border: 1px solid rgba(13, 13, 13, 0.18);
  border-radius: 8px;
  box-shadow:
    0 26px 70px rgba(67, 55, 45, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out, box-shadow 0.35s ease;
}

.skills-card::before {
  content: "";
  position: absolute;
  inset: -45% -25%;
  z-index: -1;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.76) 46%, transparent 64%);
  transform: translateX(-32%) rotate(7deg);
  opacity: 0.72;
}

.skills-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
}

.section-in-view .skills-card {
  box-shadow:
    0 30px 80px rgba(67, 55, 45, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section-in-view .skills-card::before {
  animation: cardShine 1.25s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.skills-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skills-card strong {
  margin: 0.7rem 0 1.1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 500;
  line-height: 0.96;
}

.skills-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

@keyframes cardShine {
  from {
    transform: translateX(-42%) rotate(7deg);
  }

  to {
    transform: translateX(18%) rotate(7deg);
  }
}

.circle-line {
  width: 260px;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.circle-one {
  right: -90px;
  top: -110px;
}

.circle-two {
  left: -90px;
  bottom: -120px;
}

.vision {
  background: var(--paper);
}

.vision-box {
  position: relative;
  min-height: 520px;
  margin-left: 3vw;
  padding: clamp(2rem, 6vw, 5rem);
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
}

.vision-box p {
  margin-inline: auto;
}

.spark-box-one {
  left: 0;
  top: 0;
}

.spark-box-one::before {
  width: 22px;
  height: 22px;
}

.vision-highlight {
  height: 100%;
  min-height: 520px;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--warm);
  transform: translateY(var(--scroll-shift, 0));
  transition: transform 0.35s ease-out;
}

.vision-highlight span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(13, 13, 13, 0.62);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 0.78;
}

.vision-highlight p {
  max-width: 460px;
  margin-top: 2rem;
  color: var(--ink);
}

.goals {
  text-align: center;
}

.goals .container {
  max-width: 950px;
}

.goals p {
  margin-inline: auto;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

.goals .closing {
  max-width: 100%;
  margin-top: 3rem;
  font-size: 1rem;
}

.contact {
  background:
    linear-gradient(90deg, transparent 0 70%, var(--warm) 70% 100%),
    var(--paper);
}

.contact-panel {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--line);
  background: rgba(248, 247, 244, 0.84);
}

.contact-panel::after {
  content: "";
  position: absolute;
  right: clamp(1.2rem, 4vw, 3rem);
  top: clamp(1.2rem, 4vw, 3rem);
  width: 52px;
  height: 52px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

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

.contact-grid a {
  min-height: 96px;
  padding: 1.25rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid rgba(13, 13, 13, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  text-align: center;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.contact-grid i {
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.contact-grid span {
  overflow-wrap: anywhere;
}

.contact-grid a:hover {
  background: var(--warm);
  transform: translateY(-4px);
}

footer {
  background: var(--ink);
  color: var(--paper);
}

.reveal,
.stagger-item {
  opacity: 0;
  transform: translateY(44px);
  filter: blur(8px);
  transition:
    opacity 0.85s cubic-bezier(0.19, 1, 0.22, 1),
    transform 0.85s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.85s ease;
  will-change: opacity, transform, filter;
}

.reveal-left {
  transform: translateX(-52px);
}

.reveal-right {
  transform: translateX(52px);
}

.reveal-zoom {
  transform: scale(0.92) translateY(34px);
}

.reveal-up {
  transform: translateY(56px);
}

.reveal.is-visible,
.reveal.is-visible .stagger-item {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: blur(0);
}

.delay-1 {
  transition-delay: 0.16s;
}

.stagger-item {
  transition-delay: var(--stagger-delay, 0ms);
}

.section-in-view .portrait-arch img,
.section-in-view .oval-photo img {
  animation: imageFocus 1.2s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes imageFocus {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1);
  }
}

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

  .reveal,
  .stagger-item {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (max-width: 991px) {
  .portfolio-nav {
    background: rgba(248, 247, 244, 0.96);
  }

  .hero {
    padding-top: 5.5rem;
    background: linear-gradient(90deg, var(--warm) 0 8%, transparent 8%), var(--paper);
  }

  .hero .min-vh-100 {
    min-height: auto !important;
    padding: 5rem 0;
  }

  .about {
    background: var(--paper);
  }

  .vision-box {
    margin: 0;
  }

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

@media (max-width: 575px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: clamp(4rem, 20vw, 5.7rem);
  }

  h2 {
    font-size: clamp(3.1rem, 16vw, 4.4rem);
  }

  .section-pad {
    padding: 4.5rem 0;
  }

  .btn {
    width: 100%;
  }

  .portrait-arch {
    width: min(330px, 88vw);
  }

  .timeline article {
    padding-left: 3rem;
  }

  .study-collage {
    min-height: 340px;
  }

  .study-collage img {
    width: 76%;
    right: 7%;
  }

  .vision-box,
  .vision-highlight {
    min-height: 430px;
  }
}
