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

:root {
  --bg:           #0d0d0d;
  --surface:      #141414;
  --surface-2:    #1c1c1c;
  --burgundy:     #8B1A2E;
  --burgundy-h:   #a5223a;
  --burgundy-dim: rgba(139, 26, 46, 0.15);
  --text:         #e4e2df;
  --text-muted:   #686868;
  --border:       rgba(255, 255, 255, 0.07);
  --radius:       14px;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ─────────────────────────────────────────────
   Nav
───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(13, 13, 13, 0.96);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--burgundy);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.25s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--burgundy);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────
   Hero
───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 2rem 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5rem;
}

.hero-text {
  animation: fadeUp 0.9s var(--ease) both;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--burgundy);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* ─────────────────────────────────────────────
   Button
───────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 0.03em;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-primary:hover {
  background: var(--burgundy-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 26, 46, 0.35);
}

/* ─────────────────────────────────────────────
   Hero Photo
───────────────────────────────────────────── */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.9s 0.15s var(--ease) both;
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hero-photo-frame {
  position: absolute;
  z-index: 0;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  border: 2px solid var(--burgundy);
  top: 18px;
  left: calc(50% - 200px + 18px);
  opacity: 0.6;
}

/* ─────────────────────────────────────────────
   Sections
───────────────────────────────────────────── */
.section {
  padding: 110px 2rem;
}

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

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.section-title::after {
  content: '.';
  color: var(--burgundy);
}

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

/* ─────────────────────────────────────────────
   Flip Cards
───────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.flip-card {
  height: 300px;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s var(--ease);
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
}

.flip-card-front {
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s var(--ease);
}

.flip-card:not(.flipped):hover .flip-card-front {
  box-shadow: 0 0 0 1px var(--burgundy), 0 12px 40px rgba(139, 26, 46, 0.18);
}

.flip-card-back {
  background: var(--burgundy);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

/* Scroll fade indicator */
.flip-card-back-wrap {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 2;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card-back-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(to bottom, transparent, var(--burgundy));
  opacity: 1;
  transition: opacity 0.3s ease;
}

.flip-card-back-wrap.scrolled-end::after {
  opacity: 0;
}

.flip-card-back::-webkit-scrollbar {
  width: 4px;
}

.flip-card-back::-webkit-scrollbar-track {
  background: transparent;
}

.flip-card-back::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}

.flip-card-back p,
.flip-card-back li {
  font-size: 0.875rem;
  line-height: 1.65;
}

.flip-card-back ul {
  padding-left: 1.1rem;
  list-style: disc;
  margin-top: 0.25rem;
}

.flip-card-back li {
  margin-bottom: 0.2rem;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--burgundy);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.flip-card-back .card-tag {
  color: rgba(255, 255, 255, 0.65);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.card-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

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

.card-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────
   Hobbies
───────────────────────────────────────────── */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.hobby-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hobby-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.hobby-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--surface);
}

.hobby-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

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

.hobby-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hobby-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
  pointer-events: none;
}

.hobby-body {
  padding: 1.5rem 1.75rem;
}

.hobby-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.hobby-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hobby-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hobby-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--burgundy);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}

.hobby-link:hover {
  color: var(--burgundy-h);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────────────
   Footer / Contact
───────────────────────────────────────────── */
.footer {
  padding: 100px 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 520px;
  margin: 0 auto;
}

.footer-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.footer-title::after {
  content: '.';
  color: var(--burgundy);
}

.footer-sub {
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  font-size: 1rem;
}

.footer-socials {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.footer-socials a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.footer-socials a:hover {
  color: var(--text);
}

.footer-copy {
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

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

/* ─────────────────────────────────────────────
   Keyframes
───────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────
   Responsive — Tablet
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 100px;
    gap: 3rem;
    text-align: center;
  }

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

  .hero-bio {
    max-width: 100%;
  }

  .hero-visual {
    order: -1;
  }

  .hero-photo {
    max-width: 220px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
  }

  .hero-photo-frame {
    display: none;
  }

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

/* ─────────────────────────────────────────────
   Responsive — Mobile
───────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--surface);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    animation: fadeUp 0.25s var(--ease) both;
  }

  .nav-links.open a {
    font-size: 1rem;
    color: var(--text);
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 80px 1.5rem;
  }

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

  .flip-card {
    height: 280px;
  }
}
