/* =========================================================
   LAYOUT — Single-page portfolio
   ========================================================= */

/* ── Scroll progress bar ────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Ambient background orbs ────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb-1 {
  width: 700px;
  height: 700px;
  background: var(--accent);
  opacity: 0.07;
  top: -200px;
  right: -150px;
  animation: orbDrift 28s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-hover);
  opacity: 0.06;
  bottom: 15%;
  left: -180px;
  animation: orbDrift 22s ease-in-out infinite reverse;
  animation-delay: -6s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  opacity: 0.05;
  top: 45%;
  right: 8%;
  animation: orbDrift 35s ease-in-out infinite;
  animation-delay: -14s;
}

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(20px, -30px) scale(1.04); }
  50%       { transform: translate(-25px, 20px) scale(0.96); }
  75%       { transform: translate(15px, 25px) scale(1.02); }
}

/* ── Header & Navigation ────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  transition: padding 0.3s ease;
}

.site-header.scrolled {
  padding: 0.5rem 1.5rem;
}

.nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur, 24px)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--nav-blur, 24px)) saturate(180%);
  border-radius: 50px;
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
}

.nav-left {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-left a {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-left a:hover { opacity: 0.8; }

.nav-right {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-right a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-right a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.nav-right a.active {
  color: var(--accent);
}

.nav-right a:last-child {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  margin-left: 0.25rem;
}

.nav-right a:last-child:hover {
  background: var(--accent-hover);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-soft);
  text-decoration: none;
  color: var(--bg);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: var(--bg);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--bg);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 1.5rem 7rem;
  z-index: 1;
  overflow: hidden;
}

/* Subtle dot grid on the hero */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.7;
}

/* Bottom fade for the hero */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease forwards;
  animation-delay: 0.1s;
}

.hero-name {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.hero-first {
  display: block;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.2s;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-last {
  display: block;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.32s;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease forwards;
  animation-delay: 0.5s;
}

.hero-bio {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 36rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease forwards;
  animation-delay: 0.65s;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease forwards;
  animation-delay: 0.82s;
}

.hero-scroll {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards;
  animation-delay: 1.3s;
  text-decoration: none;
  z-index: 1;
}

.hero-scroll-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(1) translateY(0); }
  50%       { opacity: 1;    transform: scaleY(0.85) translateY(4px); }
}

/* ── Reveal animation system ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Keyframes for hero load sequence */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: opacity 0.3s ease;
    transform: none;
  }
  .orb { animation: none; }
  .hero-scroll-line { animation: none; opacity: 0.5; }
  .hero-eyebrow, .hero-first, .hero-last,
  .hero-sub, .hero-bio, .hero-actions, .hero-scroll {
    opacity: 1;
    animation: none;
  }
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 8rem 0;
  z-index: 1;
}

.section-alt {
  background: var(--bg-soft);
}

.section-alt::before,
.section-alt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-alt::before { top: 0; }
.section-alt::after  { bottom: 0; }

.section-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  margin-bottom: 5rem;
}

.timeline-line {
  position: absolute;
  left: 16px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
  transition: bottom 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-line.drawing::after {
  bottom: 0;
}

.timeline-item {
  position: relative;
  padding-left: 52px;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.timeline-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.timeline-item:hover .timeline-card::before {
  transform: scaleY(1);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateX(6px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.timeline-card h3 {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.job-company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.job-duration {
  font-size: 0.8rem;
  color: var(--text-subtle);
  white-space: nowrap;
  background: var(--bg-elevated);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.job-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.highlights li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  position: relative;
}

.highlights li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.82rem;
}

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

.tech-tags span {
  font-size: 0.77rem;
  padding: 0.28rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tech-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Bento Grid (Achievements) ───────────────────────────── */
.achievements {
  margin-bottom: 5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.bento-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.bento-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.bento-card:hover::after {
  opacity: 1;
}

.bento-accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-soft));
}

.bento-wide {
  grid-column: span 3;
}

.bento-stat {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.bento-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.bento-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.bento-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Skills Grid ─────────────────────────────────────────── */
.skills-section {
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.skill-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--bg-elevated);
}

.skill-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skill-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Notes Grid ──────────────────────────────────────────── */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.note-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.note-card:hover::before {
  transform: scaleX(1);
}

.note-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.note-date {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.note-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.note-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.notes-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.notes-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Travel Grid ─────────────────────────────────────────── */
.travel-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 40rem;
  margin-bottom: 3rem;
}

.travel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.travel-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.travel-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.travel-img-wrap {
  position: relative;
  overflow: hidden;
  height: 148px;
}

/* CSS-drawn image placeholder — no emoji */
.travel-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-soft) 100%);
  transition: transform 0.55s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.travel-card:hover .travel-img-placeholder {
  transform: scale(1.06);
}

.travel-img-placeholder::before {
  content: '';
  width: 44px;
  height: 36px;
  border: 2px solid var(--border-hover);
  border-radius: 8px;
  opacity: 0.4;
}

.travel-img-placeholder::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  opacity: 0.4;
}

.travel-info {
  padding: 1.25rem;
}

.travel-info time {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.travel-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.travel-info p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.photography-note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  border-left: 3px solid var(--accent);
}

.photography-note h3 {
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.photography-note p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-copy {
  color: var(--text-subtle);
  font-size: 0.84rem;
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-wide { grid-column: span 2; }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .travel-grid { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav-right a:not(:last-child) { display: none; }
  .nav-right .nav-link { display: none; }

  .hero-section { padding: 6.5rem 1rem 5rem; }

  .section { padding: 5rem 0; }
  .section-inner { padding: 0 1rem; }
  .section-header { flex-direction: column; align-items: flex-start; }

  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .notes-grid { grid-template-columns: 1fr; }
  .travel-grid { grid-template-columns: 1fr; }

  .timeline-item { padding-left: 38px; }
  .timeline-line  { left: 11px; }
  .timeline-dot   { left: 3px; width: 16px; height: 16px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

