/* ───────────────────────────────────────────────── RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #06080f;
  --bg-card:     #0a0e17;
  --border:      rgba(255,255,255,0.07);
  --border-btn:  rgba(255,255,255,0.45);
  --text:        #f2f2f2;
  --text-muted:  #8496b0;
  --accent:      #8a9dbf;      /* muted steel-blue, matches original "future" */
  --sidebar-w:   82px;
  --font-body:   'Poppins', sans-serif;
  --font-head:   'Montserrat', sans-serif;
  --font-serif:  'Instrument Serif', serif;
  --font-script: 'Dancing Script', cursive;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  /* deep navy radial glow — matches the blue depth in the original */
  background-image:
    radial-gradient(ellipse 70% 60% at 65% 40%, #0e2040 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 10%, #0b1a30 0%, transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ───────────────────────────────────────────────── SIDEBAR */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
}

.logo-box {
  width: 100%;
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text);
}

.side-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 56px;
  align-items: center;
  padding: 20px 0;
}

.nav-item {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #8496b0;
  transition: color 0.3s;
}
.nav-item:hover,
.nav-item.active { color: var(--text); }

.social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  width: 100%;
}

.social-link {
  color: rgba(242,242,242,0.75);
  transition: color 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-link svg { width: 19px; height: 19px; stroke-width: 1.6; }
.social-link:hover {
  color: #ffffff;
  transform: scale(1.2);
}

/* mail icon in top bar */
.mail-icon {
  display: inline-block;
  vertical-align: middle;
  margin: 0 5px;
  opacity: 0.85;
  position: relative;
  top: -1px;
}

/* ───────────────────────────────────────────────── MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

/* ───────────────────────────────────────────────── TOP BAR */
.top-bar {
  padding: 52px 60px 28px;
}
.top-bar-text {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: #8496b0;
  text-transform: uppercase;
}
.dot { color: #8496b0; margin-right: 6px; }

/* ───────────────────────────────────────────────── SECTIONS */
.section { padding: 110px 60px; max-width: 1120px; }

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 0 60px;
}

.section-header { margin-bottom: 64px; }

.section-tag {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(64px, 8vw, 110px);
  line-height: 0.9;
  letter-spacing: 1px;
  color: var(--text);
  text-transform: uppercase;
}

/* ───────────────────────────────────────────────── HERO */
.hero {
  min-height: calc(100vh - 53px);
  display: flex;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
  padding-left: 60px;
  padding-right: 60px;
  /* override section max-width so it spans full width */
  max-width: none !important;
  position: relative;
  overflow: hidden;
}

.hero-content { width: 100%; max-width: min(100%, 1100px); }

.intro-name {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.8vw, 26px);
  color: #8496b0;
  margin-bottom: 16px;
  font-style: italic;
}

.hero-headline {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(40px, 4vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 36px;
  text-transform: none;
}

/* ── Keyword rotator ───────────────────────────────────────── */
.keyword-rotator {
  display: block;
  overflow: hidden;
  height: 1.05em;
}
.keyword-current {
  display: block;
  white-space: nowrap;
  will-change: transform, opacity;
}
.keyword-current.kw-exit {
  animation: kwSlideUp 0.52s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.keyword-current.kw-enter {
  animation: kwSlideIn 0.52s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
@keyframes kwSlideUp {
  from { transform: translateY(0);     opacity: 1; }
  to   { transform: translateY(-105%); opacity: 0; }
}
@keyframes kwSlideIn {
  from { transform: translateY(105%);  opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* "future" — muted blue-gray, italic script, matches original */
.accent-script {
  font-family: var(--font-script);
  font-size: 0.74em;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  display: inline-block;
  transform: translateY(0.05em);
}

.hero-body {
  font-size: 15.5px;
  font-weight: 300;
  line-height: 1.85;
  color: #90a1b9;
  max-width: 540px;
  margin-bottom: 48px;
}

/* ───────────────────────────────────────────────── SCROLL DOWN */
.scroll-down {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.scroll-down:hover { color: var(--text); }

.scroll-arrow {
  display: inline-block;
  font-size: 16px;
  animation: arrowBounce 1.6s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0);   opacity: 1; }
  40%       { transform: translateY(5px); opacity: 0.6; }
  70%       { transform: translateY(2px); opacity: 0.9; }
}

/* ───────────────────────────────────────────────── HERO GHOST TEXT */
.hero-ghost-text {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: clamp(56px, 5.8vw, 90px);
  font-weight: 900;
  color: rgba(255,255,255,0.07);
  line-height: 1.05;
  pointer-events: none;
  user-select: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: right;
}

/* ───────────────────────────────────────────────── BUTTONS */
.cta-group { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid var(--border-btn);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.28s, color 0.28s, border-color 0.28s;
}
.btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ───────────────────────────────────────────────── CIRCULAR BADGE (FIXED) */
.circular-badge {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 152px;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.circular-badge svg {
  position: absolute;
  top: 0; left: 0;
  animation: spin 24s linear infinite;
}

.badge-text {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  fill: rgba(242,242,242,0.75);
  text-transform: uppercase;
}

.badge-arrow {
  font-size: 18px;
  color: rgba(242,242,242,0.7);
  z-index: 1;
  position: relative;
}

/* hidden state (JS toggles this when footer enters view) */
.circular-badge.hidden {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* hide on mobile */
@media (max-width: 768px) {
  .circular-badge { display: none !important; }
}

/* ───────────────────────────────────────────────── SHOWCASE */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.project-card {
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
}

.project-img {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-info {
  padding: 24px 28px;
  border-top: 1px solid var(--border);
}

.project-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.project-name {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ───────────────────────────────────────────────── EXPERTISE */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.expertise-item {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.expertise-item:hover { background: var(--bg-card); }

.expertise-number {
  display: block;
  font-family: var(--font-head);
  font-size: 46px;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
  /* make number pop on hover */
  transition: color 0.3s;
}
.expertise-item:hover .expertise-number { color: rgba(255,255,255,0.1); }

.expertise-name {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.expertise-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ───────────────────────────────────────────────── ABOUT */
.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo {
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-body {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(242,242,242,0.68);
  margin-bottom: 20px;
}
.about-body em {
  font-family: var(--font-serif);
  color: var(--accent);
  font-style: italic;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 52px;
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ───────────────────────────────────────────────── JOURNAL */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.journal-card {
  padding: 40px 36px 40px 0;
  display: flex;
  flex-direction: column;
}
.journal-card:nth-child(2) { padding-left: 36px; border-left: 1px solid var(--border); }
.journal-card:last-child   { padding-left: 36px; border-left: 1px solid var(--border); padding-right: 0; }

.journal-date {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.journal-category {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 16px;
}
.journal-title {
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: 0.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.journal-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.journal-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  transition: color 0.25s;
  margin-top: auto;
}
.journal-link:hover { color: var(--text); }

/* ───────────────────────────────────────────────── CONTACT */
.contact-section {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-title { font-size: clamp(80px, 12vw, 155px); }
.contact-body {
  font-size: 15px;
  line-height: 1.8;
  color: #90a1b9;
  max-width: 540px;
  margin-bottom: 48px;
}

/* ───────────────────────────────────────────────── FOOTER */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 60px;
  border-top: 1px solid var(--border);
}
.footer-copy {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-muted);
}
.footer-top {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  transition: color 0.25s;
}
.footer-top:hover { color: var(--text); }

/* ───────────────────────────────────────────────── PLACEHOLDER */
.placeholder-img { position: relative; }
.project-placeholder-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.12);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════ SCROLL ANIMATIONS */

/* — Base states (hidden) — */
[data-reveal] {
  opacity: 0;
  transition-property: opacity, transform, filter;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-duration: 0.85s;
  will-change: opacity, transform;
}

/* Fade up (default) */
[data-reveal="up"]      { transform: translateY(40px); }
/* Fade from left */
[data-reveal="left"]    { transform: translateX(-36px); }
/* Fade from right */
[data-reveal="right"]   { transform: translateX(36px); }
/* Scale up */
[data-reveal="scale"]   { transform: scale(0.94); filter: blur(2px); }
/* Just fade */
[data-reveal="fade"]    { transform: none; }

/* — Visible state — */
[data-reveal].in-view {
  opacity: 1;
  transform: none;
  filter: none;
}

/* stagger delays for grid children */
[data-stagger] > * { opacity: 0; transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1); }
[data-stagger].in-view > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0ms; }
[data-stagger].in-view > *:nth-child(2) { opacity:1; transform:none; transition-delay: 90ms; }
[data-stagger].in-view > *:nth-child(3) { opacity:1; transform:none; transition-delay: 180ms; }
[data-stagger].in-view > *:nth-child(4) { opacity:1; transform:none; transition-delay: 270ms; }
[data-stagger].in-view > *:nth-child(5) { opacity:1; transform:none; transition-delay: 360ms; }
[data-stagger].in-view > *:nth-child(6) { opacity:1; transform:none; transition-delay: 450ms; }

/* hero content animates on load, not scroll */
.hero-content { opacity: 0; transform: translateY(28px);
  animation: heroIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════ MOBILE NAV */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(6,8,15,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
}

.mobile-logo {
  font-size: 13px;
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: 3px;
  color: #f2f2f2;
}

.mobile-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-book-btn {
  font-size: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 2px;
  color: #f2f2f2;
  border: 1px solid rgba(242,242,242,0.45);
  padding: 7px 12px;
  border-radius: 2px;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.mobile-book-btn:hover {
  border-color: #f2f2f2;
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(242,242,242,0.8);
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* DRAWER */
.mobile-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background: #080d18;
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-drawer.open { right: 0; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 290;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.drawer-logo {
  font-size: 14px;
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: 2px;
  color: #f2f2f2;
}
.drawer-close {
  background: none;
  border: none;
  color: rgba(242,242,242,0.6);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.drawer-close:hover { color: #f2f2f2; }

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 40px 28px;
  gap: 32px;
  flex: 1;
}
.drawer-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(242,242,242,0.38);
  text-decoration: none;
  transition: color 0.25s;
}
.drawer-link:hover { color: rgba(242,242,242,0.75); }

.drawer-social {
  display: flex;
  gap: 24px;
  padding: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.drawer-social-link {
  color: rgba(242,242,242,0.35);
  transition: color 0.25s;
  display: flex;
  align-items: center;
}
.drawer-social-link:hover { color: rgba(242,242,242,0.7); }

/* ═══════════════════════════════════════════════ TABLET */
@media (max-width: 1024px) {
  .projects-grid    { grid-template-columns: 1fr; }
  .expertise-grid   { grid-template-columns: repeat(2, 1fr); }
  .about-layout     { grid-template-columns: 1fr; }
  .about-photo      { max-width: 280px; }
  .journal-grid     { grid-template-columns: 1fr; }
  .journal-card     { padding: 32px 0 !important; border-left: none !important;
                      border-bottom: 1px solid var(--border); }
}

/* ═══════════════════════════════════════════════ MOBILE */
@media (max-width: 768px) {

  /* Show mobile nav, hide sidebar */
  .mobile-nav { display: flex; }
  .sidebar    { display: none; }

  /* Body needs top padding for fixed mobile nav */
  .main-content {
    margin-left: 0;
    padding-top: 56px;
  }

  /* Top bar — hidden on mobile */
  .top-bar {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: calc(100vh - 56px);
    padding: 40px 24px 60px;
    max-width: none !important;
    align-items: flex-start;
  }
  .hero-content {
    max-width: 100%;
    width: 100%;
  }
  .intro-name {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .hero-headline {
    font-size: clamp(36px, 8vw, 56px);
    line-height: 0.97;
    margin-bottom: 24px;
  }
  .hero-body {
    font-size: 14px;
    margin-bottom: 32px;
    max-width: 100%;
  }
  .cta-group {
    flex-direction: column;
    gap: 12px;
  }
  .btn { width: 100%; justify-content: center; padding: 16px 20px; }
  .scroll-down { margin-top: 40px; }

  /* Hide ghost text and badge on mobile */
  .hero-ghost-text { display: none; }

  /* Sections */
  .section {
    padding: 64px 24px;
    max-width: 100%;
  }
  .section-divider { margin: 0 24px; }
  .section-title { font-size: clamp(44px, 10vw, 68px); }

  /* Showcase */
  .projects-grid { grid-template-columns: 1fr; gap: 2px; }

  /* Expertise */
  .expertise-grid { grid-template-columns: 1fr; border-left: none; }
  .expertise-item { padding: 32px 24px; border-left: 1px solid var(--border); }

  /* About */
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-photo  { max-width: 200px; aspect-ratio: 1/1; }
  .about-stats  { gap: 20px; flex-wrap: wrap; }
  .stat-number  { font-size: 40px; }

  /* Journal */
  .journal-grid { grid-template-columns: 1fr; }
  .journal-card { padding: 28px 0 !important; border-left: none !important;
                  border-bottom: 1px solid var(--border); }

  /* Contact */
  .contact-section  { min-height: auto; padding-top: 64px; padding-bottom: 64px; }
  .contact-title    { font-size: clamp(48px, 12vw, 72px); }
  .contact-body     { font-size: 14px; }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 20px 24px;
  }

  /* Hero animation: no parallax on mobile */
  .hero-headline { transform: none !important; opacity: 1 !important; }
}

/* very small screens */
@media (max-width: 400px) {
  .hero-headline { font-size: 32px; }
  .section-title { font-size: 40px; }
}
