:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --content-width: 720px;
  --gutter: clamp(24px, 5vw, 100px);

  --bg: #000;
  --fg: #ffffff;
  --fg-soft: rgba(255,255,255,0.72);
  --fg-mute: rgba(255,255,255,0.5);
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);

  --accent: #ff6b1a;
  --glow-opacity: 0.72;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);

  --glass-bg: rgba(255,255,255,0.05);
  --glass-bg-strong: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.1);
  --glass-highlight: rgba(255,255,255,0.12);
  --glass-shadow: 0 6px 24px rgba(0,0,0,0.28), 0 1px 2px rgba(0,0,0,0.18);

  --grow: 0;
}

body[data-page="home"]     { --accent: #ff6b1a; --glow-opacity: 0.72; }
body[data-page="about"]    { --accent: #ff3d3d; --glow-opacity: 0.58; }
body[data-page="edu"]      { --accent: #00d4a8; --glow-opacity: 0.50; }
body[data-page="projects"] { --accent: #ff5b9e; --glow-opacity: 0.58; }
body[data-page="writeups"] { --accent: #f5b400; --glow-opacity: 0.54; }
body[data-page="writeup"]  { --accent: #00d4a8; --glow-opacity: 0.46; }
body[data-page="links"]    { --accent: #a855f7; --glow-opacity: 0.58; }
body[data-page="404"]      { --accent: #ff3d3d; --glow-opacity: 0.52; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(15.5px, 0.95vw, 17px);
  font-weight: 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
body.is-loading { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

strong { color: #fff; font-weight: 600; }
em { font-style: italic; }

.brush {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding-bottom: 0.06em;
}
.brush > svg {
  position: absolute;
  left: -0.06em;
  bottom: -0.14em;
  width: calc(100% + 0.12em);
  height: 0.32em;
  fill: var(--accent);
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
  clip-path: inset(0 100% 0 0);
  animation: brushPaint 0.6s cubic-bezier(0.3, 0, 0.2, 1) 0.28s forwards;
}
@keyframes brushPaint {
  to { clip-path: inset(0 0 0 0); }
}

.sub-u {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  text-decoration-skip-ink: none;
}

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.bg-glow {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 55vh;
  z-index: 0; pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent) 72%, transparent) 18%,
    color-mix(in srgb, var(--accent) 40%, transparent) 40%,
    color-mix(in srgb, var(--accent) 15%, transparent) 62%,
    color-mix(in srgb, var(--accent) 4%, transparent) 82%,
    transparent 100%
  );
  opacity: 0;
  animation: glowIn 2.4s var(--ease) 0.2s forwards;
  transition: background 1.1s var(--ease), opacity 0.5s ease;
  will-change: opacity;
}
@keyframes glowIn { to { opacity: var(--glow-opacity); } }

.bg-fade {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: 1; pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%, transparent 42%,
    rgba(0,0,0,0.14) 56%,
    rgba(0,0,0,0.32) 70%,
    rgba(0,0,0,0.5) 84%,
    rgba(0,0,0,0.62) 100%
  );
}

.page-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  z-index: 150;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.85) 22%,
    rgba(0, 0, 0, 0.55) 52%,
    rgba(0, 0, 0, 0.22) 78%,
    transparent 100%
  );
}

.loader {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }

.greeting {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.greeting.show { opacity: 1; transform: translateY(0); }

.loader__bar {
  width: 180px; height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden; position: relative;
}
.loader__bar span {
  display: block; height: 100%; width: 40%;
  background: var(--accent); border-radius: 2px;
  position: absolute; left: -40%;
  animation: loaderBar 1.6s var(--ease) infinite;
}
@keyframes loaderBar { 0% { left: -40%; } 100% { left: 100%; } }

.btn-glass {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  border-radius: 999px;
  font-family: inherit;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-glass:hover { background: var(--glass-bg-strong); border-color: rgba(255,255,255,0.18); }
.btn-glass:active { transform: scale(0.95); }

.skip-btn {
  position: fixed; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1.8rem;
  font-size: 0.88rem; font-weight: 500;
}
.skip-btn:active { transform: translateX(-50%) scale(0.95); }

.header {
  position: fixed; top: 0; left: 0;
  z-index: 99;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.4rem;
  gap: 1rem;
  pointer-events: none;
}
.header > * { pointer-events: auto; }

.logo, .nav, .nav-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.logo {
  display: inline-flex; align-items: center; justify-content: center;
  padding: calc(0.5rem + var(--grow) * 0.14rem) calc(1rem + var(--grow) * 0.32rem);
  border-radius: 999px;
  transition: padding 0.45s var(--ease-ios), transform 0.35s var(--ease-ios), background 0.35s ease, border-color 0.35s ease;
}
.logo:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.logo__inner {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.logo__extend {
  display: inline-block;
  width: 0;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: width 0.45s var(--ease-ios), max-width 0.45s var(--ease-ios), opacity 0.32s ease;
}
.logo:hover .logo__extend,
.logo:focus-visible .logo__extend,
.logo:active .logo__extend {
  width: 5.5ch;
  max-width: 5.5ch;
  opacity: 1;
}

.nav {
  display: flex; gap: 0.3rem;
  padding: calc(0.3rem + var(--grow) * 0.14rem);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: padding 0.45s var(--ease-ios);
}
.nav a {
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  color: var(--fg-soft);
  transition: color 0.25s ease, background 0.3s ease, padding 0.3s ease;
}
.nav a:hover { color: var(--fg); padding-left: 1.05rem; padding-right: 1.05rem; }
.nav a[aria-current="page"] { color: var(--fg); background: rgba(255,255,255,0.07); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-ios), background 0.35s ease;
}
.nav-toggle:active { transform: scale(0.94); }
.nav-toggle__lines {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; width: 18px; height: 14px;
}
.nav-toggle__lines span {
  display: block; width: 18px; height: 1.6px;
  background: var(--fg); border-radius: 2px;
  transform-origin: center;
  transition: transform 0.45s var(--ease-ios), opacity 0.3s ease, width 0.35s var(--ease-ios);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 780px) {
  .header { padding: 0.9rem 1rem; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
}

.nav-overlay {
  position: fixed; inset: 0;
  z-index: 98;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease-ios);
}
.nav-overlay.active { opacity: 1; pointer-events: auto; }
.nav-overlay a {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
  opacity: 0;
  transform: translateY(18px);
  transition: transform 0.55s var(--ease-ios), opacity 0.45s var(--ease-ios), color 0.3s ease;
}
.nav-overlay.active a { opacity: 1; transform: translateY(0); }
.nav-overlay a[aria-current="page"] { color: var(--accent); }

.app { position: relative; z-index: 10; min-height: 100vh; }

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(6rem, 13vh, 8.5rem) var(--gutter) 4.5rem;
  animation: pageIn 0.6s var(--ease);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero { margin-bottom: 3.75rem; }
.hero .name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  color: #fff;
}
.hero .role {
  font-size: clamp(0.98rem, 1.05vw, 1.08rem);
  color: var(--fg-soft);
  line-height: 1.7;
  max-width: 44ch;
  letter-spacing: -0.005em;
}

h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 2.4rem;
  color: #fff;
  text-transform: lowercase;
  display: inline-block;
}

.prose {
  font-size: clamp(0.98rem, 1.02vw, 1.05rem);
  line-height: 1.8;
  color: var(--fg);
  max-width: 62ch;
}
.prose + .prose { margin-top: 1.2rem; }
.prose.muted { color: var(--fg-soft); }

.traits {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 1.35rem;
  margin: 2.5rem 0 3rem;
}
.traits li {
  display: flex; align-items: center; gap: 1rem;
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  color: var(--fg);
  line-height: 1.55;
}
.traits em { font-style: italic; color: var(--fg-soft); }
.traits .ic { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--accent); opacity: 0.92; }

.section { margin-top: 4rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: lowercase;
}
.section h2 .ic { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

.entry + .entry { margin-top: 2.35rem; }
.entry-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: clamp(0.86rem, 3.6vw, 1rem);
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.015em;
  line-height: 1.42;
  margin-bottom: 0.65rem;
}
.entry-title svg {
  width: 1em; height: 1em;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.9;
}
.entry p {
  font-size: clamp(0.92rem, 1vw, 1rem);
  color: var(--fg-soft);
  line-height: 1.75;
  margin-bottom: 0.32rem;
}
.entry .meta {
  color: var(--fg-mute);
  font-size: clamp(0.86rem, 0.92vw, 0.94rem);
}
.entry .meta strong { color: #fff; font-weight: 600; }

.links { display: flex; flex-direction: column; margin-top: 0.5rem; }
.link-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  color: #fff;
  font-size: clamp(0.98rem, 1.02vw, 1.05rem);
  border-bottom: 1px solid var(--line);
  transition: color 0.35s var(--ease), padding-left 0.4s var(--ease);
}
.link-row:first-child { border-top: 1px solid var(--line); }
.link-row .left { display: flex; align-items: center; gap: 0.95rem; min-width: 0; }
.link-row .left span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row .left svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--fg-mute); transition: color 0.3s ease; }
.link-row .arrow { color: var(--fg-mute); display: inline-flex; flex-shrink: 0; transition: transform 0.4s var(--ease), color 0.3s ease; }
.link-row .arrow svg { width: 16px; height: 16px; }

@media (hover: hover) and (pointer: fine) {
  .link-row:hover { color: var(--accent); padding-left: 0.35rem; }
  .link-row:hover .left svg { color: var(--accent); }
  .link-row:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
}

.writeups-list { display: flex; flex-direction: column; margin-top: 2.5rem; }
.writeup-item {
  display: block;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.writeup-item:first-child { border-top: 1px solid var(--line); }
.writeup-item__meta {
  display: flex; gap: 0.95rem;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 0.7rem;
}
.writeup-item__meta .cat { color: var(--accent); }
.writeup-item__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.38;
  margin-bottom: 0.6rem;
  color: #fff;
  transition: color 0.3s ease;
}
.writeup-item__excerpt { font-size: 0.95rem; color: var(--fg-soft); line-height: 1.7; max-width: 60ch; }

@media (hover: hover) and (pointer: fine) {
  .writeup-item:hover { padding-left: 0.5rem; }
  .writeup-item:hover .writeup-item__title { color: var(--accent); }
}

.post-header { margin-bottom: 3rem; }
.post-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--fg-mute);
  margin-bottom: 1.8rem;
  transition: color 0.25s ease;
}
.post-back svg { width: 14px; height: 14px; flex-shrink: 0; }
.post-back:hover { color: var(--accent); }

.post-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.28;
  margin-bottom: 1.4rem;
  color: #fff;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 1.05rem;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.post-meta .cat { color: var(--accent); }

.post-body {
  font-size: clamp(1rem, 1.05vw, 1.06rem);
  line-height: 1.8;
  color: var(--fg-soft);
  margin-top: 3rem;
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-display);
  color: #fff; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.32;
  margin: 2.8rem 0 1.2rem;
}
.post-body h1 { font-size: 1.7rem; }
.post-body h2 { font-size: 1.4rem; }
.post-body h3 { font-size: 1.15rem; }
.post-body h4 { font-size: 1.02rem; }
.post-body p { margin: 1.2rem 0; }
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.post-body strong { color: #fff; font-weight: 600; }
.post-body em { font-style: italic; }
.post-body ul, .post-body ol { margin: 1.2rem 0; padding-left: 1.5rem; }
.post-body li { margin: 0.5rem 0; }
.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem; margin: 1.7rem 0;
  color: var(--fg-mute); font-style: italic;
}
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.6rem 0; }
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #fff;
}
.post-body pre {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto; margin: 1.7rem 0;
  font-size: 0.88rem; line-height: 1.65;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--fg-soft); }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.7rem 0; border: 1px solid var(--line); }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.7rem 0; font-size: 0.92rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 0.65rem 0.85rem; text-align: left; }
.post-body th { background: rgba(255,255,255,0.04); font-weight: 600; color: #fff; }

.notfound-code {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.notfound-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.04em; line-height: 1.22;
  margin-bottom: 1.6rem;
  color: #fff;
  display: inline-block;
}
.notfound-lede {
  font-size: 1rem; color: var(--fg-soft);
  line-height: 1.7; margin-bottom: 2.4rem; max-width: 48ch;
}
.notfound-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.link-btn { font-size: 13px; color: var(--fg-mute); transition: color 0.2s ease; }
.link-btn:hover { color: #fff; }
.btn-primary {
  padding: 8px 18px; border-radius: 999px;
  background: var(--accent); color: #000;
  font-size: 13px; font-weight: 600;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover:not(:disabled) { transform: scale(1.03); }

.footer {
  position: relative;
  z-index: 60;
  margin-top: 5rem;
  padding: 0;
}

.footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.15rem;
  font-size: 12px; color: var(--fg-mute);
}
.footer__links { display: flex; gap: 1.6rem; }
.footer__links a { transition: color 0.25s ease; }
.footer__links a:hover { color: var(--accent); }
.footer__mark { font-family: var(--font-mono); font-size: 11px; }

.footer__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer__resume,
.footer__mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.25s ease, transform 0.3s var(--ease-ios);
}
.footer__resume:hover,
.footer__mail:hover {
  background: var(--glass-bg-strong);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: #fff;
  transform: translateY(-1px);
}
.footer__resume:active,
.footer__mail:active {
  transform: translateY(0) scale(0.98);
}

.boats {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.boats__prompt {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  font-weight: 500;
  color: var(--fg-soft);
  text-align: center;
  letter-spacing: -0.005em;
  margin: 0.5rem 0 1.25rem;
  padding: 0 var(--gutter);
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}
.boats__prompt.is-hidden { opacity: 0; }

.boats__scene {
  position: relative;
  width: 100%;
  height: clamp(340px, 50vh, 460px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(
      ellipse at 50% 100%,
      color-mix(in srgb, var(--accent) 22%, transparent) 0%,
      color-mix(in srgb, var(--accent) 10%, transparent) 40%,
      transparent 78%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      color-mix(in srgb, var(--accent) 3%, transparent) 25%,
      color-mix(in srgb, var(--accent) 7%, transparent) 55%,
      color-mix(in srgb, var(--accent) 14%, transparent) 82%,
      color-mix(in srgb, var(--accent) 22%, transparent) 100%
    );
  transition: background 1.2s var(--ease);
  cursor: crosshair;
}

.boats__ripples {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.boats__ripples .ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  border: 1.4px solid color-mix(in srgb, var(--accent) 70%, rgba(255,255,255,0.9));
  pointer-events: none;
  animation: rippleOut 1.4s var(--ease) forwards;
}
@keyframes rippleOut {
  0%   { transform: scale(0.3); opacity: 0.9; border-width: 1.6px; }
  100% { transform: scale(6);   opacity: 0;   border-width: 0.3px; }
}

.boats__fleet {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.boats__fleet .boat {
  pointer-events: auto;
}

.boat {
  position: absolute;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  transform-origin: center bottom;
  color: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.55));
  transition: transform 0.6s var(--ease-ios);
  will-change: transform;
}
.boat:active { transform: scale(0.92); }

.boat__inner {
  display: block;
  transform-origin: center bottom;
  animation: boatBob var(--bob-dur, 4s) ease-in-out var(--bob-delay, 0s) infinite;
}
.boat__inner svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes boatBob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-5px) rotate(1.5deg); }
}

.boat-msg {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  transform: translateX(-50%) translateY(-8px);
  max-width: min(88%, 440px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 1px 0 var(--glass-highlight);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  letter-spacing: -0.005em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-ios);
  z-index: 4;
}
.boat-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.boat-msg p { margin: 0; }

.faq {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(120px + (var(--grow) * 70px));
  max-width: calc(100vw - 32px);
  pointer-events: none;
  will-change: width;
  transition: width 0.14s linear;
}

.faq__pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  box-shadow: 0 6px 24px rgba(0,0,0,0.32), inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.35s var(--ease-ios), background 0.3s ease, border-color 0.3s ease;
}
.faq__pill:hover {
  background: rgba(20, 20, 22, 0.92);
  border-color: rgba(255,255,255,0.18);
}
.faq__pill:active { transform: scale(0.97); }
.faq__pill svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: var(--accent);
}

.faq__header { display: none; }
.faq__panel { display: none; }

.faq.is-open {
  inset: 0;
  left: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  pointer-events: auto;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  animation: faqIn 0.35s var(--ease-ios);
  transition: none;
}
@keyframes faqIn { from { opacity: 0; } to { opacity: 1; } }

.faq.is-open .faq__pill { display: none; }

.faq.is-open .faq__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.faq__header h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-transform: lowercase;
}
.faq__back {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--fg-soft);
  flex-shrink: 0;
  transition: color 0.2s ease, background 0.2s ease;
}
.faq__back:hover { color: #fff; background: var(--glass-bg-strong); }
.faq__back svg { width: 16px; height: 16px; }

.faq.is-open .faq__panel {
  display: block;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2.25rem 1.6rem 4rem;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.faq__intro h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 0.8rem;
  display: inline-block;
}
.faq__intro > p {
  font-size: 0.98rem;
  color: var(--fg-soft);
  line-height: 1.68;
  margin-bottom: 1.75rem;
}
.faq__list { display: grid; gap: 10px; }
.faq__list button {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 16px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-bg);
  color: var(--fg);
  font-size: 14.5px;
  text-align: left;
  transition: background 0.25s var(--ease-ios), border-color 0.25s ease;
}
.faq__list button::after {
  content: '';
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--fg-mute);
  border-right: 1.5px solid var(--fg-mute);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-ios), border-color 0.25s ease;
}
.faq__list button:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255,255,255,0.14);
}
.faq__list button:hover::after {
  border-color: var(--accent);
  transform: rotate(45deg) translate(2px, -2px);
}

.faq__answer { animation: faqAnsIn 0.35s var(--ease-ios); }
@keyframes faqAnsIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.faq__q {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.38;
  color: #fff;
  margin-bottom: 1.3rem;
  display: inline-block;
}
.faq__a {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--fg-soft);
  margin-bottom: 2rem;
}
.faq__a strong { color: #fff; font-weight: 600; }
.faq__a a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.faq__again {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.faq__again:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255,255,255,0.18);
}
.faq__again svg { width: 13px; height: 13px; opacity: 0.72; }

@media (max-width: 640px) {
  .faq.is-open .faq__header { padding: 1.1rem 1.35rem; }
  .faq.is-open .faq__panel { padding: 1.75rem 1.35rem 3.25rem; }
}

@media (max-width: 780px) {
  .page { padding: 6rem var(--gutter) 3rem; }
  .boats__scene { height: clamp(300px, 46vh, 420px); }
  .footer { margin-top: 4.5rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .footer__links { flex-wrap: wrap; gap: 1.1rem 1.6rem; }
  .footer__actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bg-glow { animation: none; opacity: var(--glow-opacity); }
  .page { animation: none; }
  .brush > svg { animation: none; clip-path: inset(0 0 0 0); }
  .boat__inner { animation: none; }
}