@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

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

:root {
  --bg:            #f9f8f6;
  --bg2:           #f3f2ef;
  --surface:       #ffffff;
  --surface2:      #f3f2ef;
  --border:        #e8e7e3;
  --text:          #1a1714;
  --muted:         #6e6860;
  --accent-music:  #c0392b;
  --accent-cs:     #2d6a4f;
  --accent-soft:   #d4cfc9;
  --radius:        16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(192,57,43,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(45,106,79,0.06) 0%, transparent 50%);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ── PAGE DUCK DECOR ── */
.page-ducks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.duck-sticker {
  position: absolute;
  font-size: clamp(1.2rem, 2.1vw, 1.9rem);
  opacity: 0.22;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.08));
  animation: duck-float 6s ease-in-out infinite;
}

.duck-1 { top: 14%; left: 3%; animation-delay: 0s; }
.duck-2 { top: 31%; right: 2.8%; animation-delay: 1.2s; }
.duck-3 { top: 54%; left: 4.5%; animation-delay: 2.2s; }
.duck-4 { top: 74%; right: 3.5%; animation-delay: 0.7s; }
.duck-5 { bottom: 4%; left: 46%; animation-delay: 1.7s; }
.duck-6 { top: 7%; right: 5%; animation-delay: 3.1s; }
.duck-7 { top: 88%; left: 5%; animation-delay: 2.4s; }

@keyframes duck-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

/* ── LOADING SCREEN ── */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 25%, rgba(192,57,43,0.08) 0%, transparent 55%),
    radial-gradient(circle at 78% 75%, rgba(45,106,79,0.08) 0%, transparent 55%),
    var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms ease, visibility 320ms ease;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-card {
  width: min(90vw, 360px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.2rem 1rem;
  text-align: center;
  box-shadow: 0 12px 32px rgba(44,33,24,0.12);
}

.loading-stars {
  color: var(--accent-soft);
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.3rem;
  animation: twinkle 1.8s ease-in-out infinite;
}

.loading-emoji {
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.loading-title {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
}

.loading-dots {
  margin-top: 0.55rem;
  display: inline-flex;
  gap: 0.34rem;
}

.loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-cs);
  animation: loading-bounce 0.9s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.12s;
  background: var(--accent-music);
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes loading-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.55; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ── DUCK ── */
.duck-scene {
  margin-bottom: 0.6rem;
}

.duck-body-group {
  animation: duck-bob 1.4s ease-in-out infinite;
}

.duck-water {
  transform-origin: 50px 61px;
  animation: duck-ripple 1.4s ease-in-out infinite;
}

@keyframes duck-bob {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-7px); }
}

@keyframes duck-ripple {
  0%, 100% { transform: scaleX(1);    opacity: 0.9; }
  50%       { transform: scaleX(1.15); opacity: 0.6; }
}

/* ── SCROLL ANIMATIONS ── */
.animate-on-scroll {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  .duck-sticker, .footer-duck, .header-duck { animation: none; }
}

/* ── HEADER ── */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-inner {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
}

.profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--border);
  flex-shrink: 0;
}

header::before,
header::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--accent-soft);
  opacity: 0.7;
}
header::before { left: 2rem; }
header::after  { right: 2rem; }

header h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.tagline {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-family: 'Space Mono', monospace;
}

/* ── SKILLS MARQUEE ── */
.marquee-wrap {
  cursor: grab;
  width: 100%;
  overflow: hidden;
  border-top: 1.5px dashed var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  background: var(--bg2);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  font-family: 'Space Mono', monospace;
  white-space: nowrap;
  color: var(--muted);
}

.marquee-wrap.dragging { cursor: grabbing; user-select: none; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .loading-stars,
  .loading-dots span,
  .duck-body-group,
  .duck-water { animation: none; }
}

/* ── MAIN COLUMNS ── */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  gap: 0;
}

.divider {
  background: var(--border);
  margin: 0 2.5rem;
  border-left: 1.5px dashed var(--border);
  background: transparent;
}

.col {
  padding: 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* ── COLUMN HEADER ── */
.col-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.1rem;
}

.col-icon { font-size: 1.4rem; line-height: 1; }

.col-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

.col-music .col-header h2 { color: var(--accent-music); }
.col-cs    .col-header h2 { color: var(--accent-cs); }

.col-desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
  position: relative;
}

.col-music .card:hover {
  transform: translateY(-3px);
  border-color: rgba(192, 57, 43, 0.4);
  box-shadow: 0 8px 28px rgba(192, 57, 43, 0.18);
}

.col-cs .card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 106, 79, 0.4);
  box-shadow: 0 8px 28px rgba(45, 106, 79, 0.18);
}

.card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  font-size: 0.87rem;
  margin-bottom: 0.85rem;
}

.card iframe {
  display: block;
  border-radius: 10px;
  margin-bottom: 0;
}

.resume-embed {
  display: block;
  width: 100%;
  border-radius: 10px;
  margin-top: 0.55rem;
}

.resume-embed-link {
  margin-top: 0.5rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  font-family: 'Inter', sans-serif;
}

.btn:hover { opacity: 0.82; transform: translateY(-1px); }

.col-music .btn           { background: var(--accent-music); color: #fff; }
.col-music .btn-secondary { background: var(--surface2); color: var(--text); border: 1.5px solid var(--border); }
.col-cs    .btn           { background: var(--accent-cs);    color: #fff; }
.col-cs    .btn-secondary { background: var(--surface2); color: var(--text); border: 1.5px solid var(--border); }

/* ── LINK ROW CARD ── */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ── RESUME ITEMS ── */
.resume-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.resume-item:last-child  { border-bottom: none; padding-bottom: 0; }
.resume-item:first-child { padding-top: 0.4rem; }

.resume-title {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  color: var(--text);
}

.resume-link { color: var(--accent-cs); text-decoration: none; }
.col-music .resume-link { color: var(--accent-music); }
.resume-link:hover { text-decoration: underline; }

.resume-url {
  display: block;
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  margin-top: 0.1rem;
  opacity: 0.75;
}

.resume-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-family: 'Space Mono', monospace;
}

.resume-item p {
  font-size: 0.84rem;
  margin-bottom: 0;
  color: var(--muted);
}

/* ── SKILLS ── */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.skill-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-family: 'Space Mono', monospace;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-tags span {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1.5px dashed var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
}

footer::before { content: '— '; }
footer::after  { content: ' —'; }

.footer-duck {
  display: inline-block;
  animation: duck-float 5s ease-in-out infinite;
  animation-delay: 0.4s;
}

.header-duck {
  position: absolute;
  bottom: 0.6rem;
  right: 2.8rem;
  font-size: 1.15rem;
  opacity: 0.35;
  animation: duck-float 6s ease-in-out infinite;
  animation-delay: 0.9s;
  pointer-events: none;
}

@media (max-width: 700px) {
  .header-duck { display: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .columns {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }

  .divider {
    height: 1.5px;
    width: 100%;
    margin: 2rem 0;
    border-left: none;
    border-top: 1.5px dashed var(--border);
  }

  .col { padding: 0; }

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

  .tagline {
    letter-spacing: 0.08em;
    line-height: 1.5;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    min-height: 40px;
  }

  header::before, header::after { display: none; }
}

/* ── NAV CARDS (homepage) ── */
.bio {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 2rem 1.5rem 0;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.nav-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 720px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.nav-card:hover { transform: translateY(-4px); }

.nav-card-music:hover {
  border-color: rgba(192, 57, 43, 0.4);
  box-shadow: 0 12px 36px rgba(192, 57, 43, 0.15);
}

.nav-card-cs:hover {
  border-color: rgba(45, 106, 79, 0.4);
  box-shadow: 0 12px 36px rgba(45, 106, 79, 0.15);
}

.nav-card-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'Space Mono', monospace;
}

.nav-card-music .nav-card-eyebrow { color: var(--accent-music); }
.nav-card-cs .nav-card-eyebrow    { color: var(--accent-cs); }

.nav-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.nav-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.nav-card-cta {
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  margin-top: 0.5rem;
}

.nav-card-music .nav-card-cta { color: var(--accent-music); }
.nav-card-cs .nav-card-cta    { color: var(--accent-cs); }

@media (max-width: 520px) {
  .nav-cards { grid-template-columns: 1fr; }
}

/* ── PAGE NAV (back link on subpages) ── */
.page-nav {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ── SINGLE PAGE LAYOUT ── */
.page-single {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  flex: 1;
  width: 100%;
}

@media (max-width: 700px) {
  .page-single { padding: 2rem 1rem 2.5rem; }
}

@media (max-width: 430px) {
  .loading-card {
    width: min(92vw, 340px);
    padding: 1.05rem 0.9rem;
  }

  .loading-emoji {
    font-size: 1.55rem;
  }

  .loading-title {
    font-size: 0.95rem;
  }

  header {
    padding: calc(2rem + env(safe-area-inset-top)) 0.9rem 1.25rem;
  }

  .header-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }

  .profile-pic {
    width: 72px;
    height: 72px;
  }

  .tagline {
    font-size: 0.76rem;
    margin-top: 0.35rem;
  }

  .marquee-wrap {
    padding: 0.5rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  }

  .marquee-track {
    gap: 0.65rem;
  }

  .marquee-track span {
    font-size: 0.72rem;
    padding: 0.16rem 0.62rem;
  }

  .columns {
    padding: 1.25rem 0.75rem calc(1.25rem + env(safe-area-inset-bottom));
  }

  .col {
    gap: 0.85rem;
  }

  .col-header h2 {
    font-size: 1.34rem;
  }

  .link-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .link-row .btn {
    width: 100%;
  }

  .resume-title {
    font-size: 0.87rem;
  }

  .resume-meta,
  .resume-url {
    font-size: 0.72rem;
  }

  .resume-item p,
  .card p {
    font-size: 0.82rem;
  }

  .card iframe {
    min-height: 180px;
  }

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  .duck-sticker {
    opacity: 0.16;
  }
}
