:root {
  --bg: #07110e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f5efe8;
  --muted: #9da49b;
  --accent: #7bdcb5;
  --accent-2: #f7c56b;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --radius-sm: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, rgba(123, 220, 181, 0.16), transparent 24%), var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}

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

#cursor-dot,
#cursor-circle {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

#cursor-circle {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.cursor-hover #cursor-dot {
  background: var(--accent-2);
}

body.cursor-hover #cursor-circle {
  width: 56px;
  height: 56px;
  border-color: var(--accent-2);
}

.bg-blur {
  position: fixed;
  filter: blur(70px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.blur-a {
  width: 240px;
  height: 240px;
  background: var(--accent);
  top: 8%;
  left: -60px;
}

.blur-b {
  width: 320px;
  height: 320px;
  background: var(--accent-2);
  bottom: 5%;
  right: -90px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: clamp(0.9rem, 1.5vw, 1.6rem) clamp(1rem, 3vw, 3rem);
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 14, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.site-header.solid {
  background: rgba(7, 17, 14, 0.9);
}

.site-header.hidden {
  transform: translateY(-110%);
  opacity: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05);
  border-color: var(--accent);
}

.brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.menu-toggle {
  display: none;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  width: clamp(2rem, 3vw, 2.5rem);
  height: clamp(1.5rem, 2.5vw, 2rem);
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  margin-bottom: 0.35rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle span:last-child {
  margin-bottom: 0;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav a,
.header-cta {
  color: var(--muted);
  font-size: clamp(0.7rem, 0.95vw, 0.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.site-nav a:hover,
.header-cta:hover {
  color: var(--text);
}

.header-cta {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

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

.section {
  padding: clamp(4.2rem, 7vw, 6rem) clamp(1rem, 3vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 2.4rem;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), transparent);
  transition: height 0.8s ease;
  pointer-events: none;
}

.section.in-view::before {
  height: 70%;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.2vw, 4.8rem);
  margin-bottom: 1.2rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-text,
.about-copy p,
.research-card p,
.research-card li,
.contact-card p,
.project-card p,
.exp-panel p {
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #04100d;
  font-weight: 600;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-stats {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-stats > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  min-width: 120px;
}

.hero-stats strong {
  display: block;
  font-size: 1.2rem;
  color: var(--accent-2);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-visual {
  position: relative;
  min-height: 540px;
}

.photo-card {
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.03));
  transform: perspective(1200px) rotateY(-6deg) rotateX(6deg);
  transition: transform 0.3s ease;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 620px;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.floating-card span {
  display: block;
  color: var(--accent);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.floating-card strong {
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
}

.card-top {
  top: 0.125rem;
  right: 1rem;
}

.card-bottom {
  bottom: 1rem;
  left: 1rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.about-grid,
.research-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.about-copy,
.about-card,
.research-card,
.skill-card,
.project-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.about-copy:hover,
.about-card:hover,
.research-card:hover,
.skill-card:hover,
.project-card:hover,
.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.pill {
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span,
.info-row strong {
  color: var(--muted);
}

.info-row strong {
  min-width: 110px;
  margin-right: 0.5rem;
}

.info-row .accent {
  color: var(--accent);
}

@media (max-width: 520px) {
  .info-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .info-row strong,
  .info-row span {
    width: 100%;
  }

  .info-row strong {
    margin-bottom: 0.2rem;
  }
}

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

.skill-card h3,
.project-card h3,
.research-card h3,
.exp-panel h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.skill-card ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1.2rem;
  align-items: center;
}

.project-meta {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-tags span {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.74rem;
}

.exp-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.2rem;
}

.exp-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.exp-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  text-align: left;
  cursor: none;
  transition: all 0.25s ease;
}

.exp-tab.active,
.exp-tab:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(123, 220, 181, 0.12);
}

.exp-panel {
  display: none;
}

.exp-panel.active {
  display: block;
}

.research-card a,
.contact-links a {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--accent);
}

.research-card ul {
  margin-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.contact-links a {
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

@media (max-width: 520px) {
  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-links {
    width: 100%;
  }
}

footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.3rem 3rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer div {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.parallax {
  will-change: transform;
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .hero-copy,
  .hero-visual {
    width: 100%;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .about-grid,
  .research-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

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

  .exp-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 5rem 1.4rem;
  }

  .site-header {
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
  }

  .brand {
    width: auto;
    justify-content: flex-start;
    gap: 0.8rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 17, 14, 0.92);
    backdrop-filter: blur(20px);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
  }

  .header-cta {
    width: 100%;
    justify-content: center;
  }

  .hero-visual {
    min-height: auto;
    margin: 0 auto;
  }

  .photo-card {
    transform: none;
    max-width: 520px;
    margin: 0 auto;
  }

  .floating-card {
    position: static;
    width: 100%;
    margin-top: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: min(260px, 100%);
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats > div {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .contact-card {
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 4.2rem 1rem;
  }

  .header-cta,
  .site-nav a {
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 11vw, 2.6rem);
  }

  .hero-text,
  .about-copy p,
  .research-card p,
  .contact-card p,
  .project-card p,
  .exp-panel p {
    font-size: 0.92rem;
  }

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

@media (max-width: 520px) {
  .section {
    padding: 4.2rem 1rem;
  }

  .section::before {
    display: none;
  }

  .site-header {
    justify-content: space-between;
    padding: 0.9rem 1rem;
  }

  .hero {
    gap: 1.2rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 13vw, 2.4rem);
  }

  .hero-copy {
    padding: 0 0.3rem;
  }

  .hero-stats,
  .hero-actions,
  .contact-links,
  footer div {
    width: 100%;
  }

  footer {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    width: 1.9rem;
    height: 1.4rem;
  }
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  #cursor-dot,
  #cursor-circle {
    display: none;
  }

  .btn,
  .exp-tab,
  .header-cta,
  .site-nav a,
  .brand,
  .menu-toggle {
    min-height: 44px;
  }
}


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

  .brand {
    gap: 0.65rem;
  }

  .brand-text {
    font-size: 1rem;
  }

  .header-cta {
    padding: 0.8rem 1rem;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .hero-copy {
    text-align: left;
    padding: 0 0.4rem;
  }

  .hero-visual {
    min-height: auto;
  }

  .photo-card {
    border-radius: 24px;
  }

  .floating-card {
    width: 100%;
  }

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

  .hero-stats {
    width: 100%;
    gap: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  footer {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1.3rem 1.4rem 2rem;
  }
}

/* Keep the section line outside all content on mobile screens. */
@media (max-width: 700px) {
  .section {
    padding-left: 2rem;
  }

  .section::before {
    display: none;
  }
}
