/*
Theme Name:        Michael Olonan Portfolio
Theme URI:         https://michaelolonan.com/
Author:            Michael Olonan
Author URI:        https://michaelolonan.com/
Description:       Personal portfolio theme for John Michael Olonan — Full Stack Website Developer. Glassmorphism + animated gradient mesh, GSAP scroll effects, horizontal portfolio, and custom cursor. Built from scratch, no page-builder bloat.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.5
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       michael-olonan
Tags:              portfolio, one-page, dark, glassmorphism, gsap, custom-theme
*/

/* ============================================
   Michael Olonan — Portfolio
   Glass + Soft gradient mesh, Deep navy + warm amber
============================================ */

:root {
  /* color – defaults; live-tweakable */
  --bg-0: #07080f;
  --bg-1: #0d1024;
  --bg-2: #141833;
  --ink-0: #f6f6fb;
  --ink-1: #cfd0e0;
  --ink-2: #8c8fa8;
  --ink-3: #5b5e7a;
  --accent: #ff8a4c;       /* warm amber */
  --accent-2: #ffb37a;
  --accent-3: #c45a1f;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.07);
  --glass-stroke: rgba(255, 255, 255, 0.09);
  --glass-stroke-strong: rgba(255, 255, 255, 0.16);

  /* type */
  --font-sans: "Geist", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;

  /* motion */
  --intensity: 1;          /* 0..1.5 — live tweakable */
  --section-pad: clamp(72px, 8vw, 140px);
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1320px;
}

/* light mode */
[data-theme="light"] {
  --bg-0: #f1eee7;
  --bg-1: #ecead9;
  --bg-2: #e3dfc8;
  --ink-0: #0f0f1a;
  --ink-1: #2b2e44;
  --ink-2: #595c75;
  --ink-3: #8d8fa1;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-stroke: rgba(15, 15, 26, 0.08);
  --glass-stroke-strong: rgba(15, 15, 26, 0.14);
}

* { box-sizing: border-box; }

html, body { padding: 0; margin: 0; }

html {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-snap-type: y proximity;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  will-change: background-color;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

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

/* ============= GRADIENT MESH BACKGROUND ============= */
.mesh {
  position: fixed;
  inset: -10vmax;
  z-index: -2;
  pointer-events: none;
  filter: blur(80px) saturate(140%);
  opacity: 0.9;
  transition: opacity 0.6s ease;
}

.mesh::before, .mesh::after,
.mesh .b1, .mesh .b2, .mesh .b3 {
  content: "";
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

[data-theme="light"] .mesh {
  filter: blur(70px) saturate(120%);
  opacity: 0.7;
}
[data-theme="light"] .mesh::before,
[data-theme="light"] .mesh::after,
[data-theme="light"] .mesh .b1,
[data-theme="light"] .mesh .b2,
[data-theme="light"] .mesh .b3 {
  mix-blend-mode: multiply;
}

.mesh::before {
  width: 60vmax; height: 60vmax;
  left: -10vmax; top: -10vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
}
.mesh::after {
  width: 55vmax; height: 55vmax;
  right: -10vmax; top: 30vmax;
  background: radial-gradient(circle, #3a5cff 0%, transparent 60%);
}
.mesh .b1 {
  width: 50vmax; height: 50vmax;
  left: 20vmax; top: 60vmax;
  background: radial-gradient(circle, #a64bff 0%, transparent 60%);
}
.mesh .b2 {
  width: 45vmax; height: 45vmax;
  right: -5vmax; bottom: -10vmax;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 60%);
}
.mesh .b3 {
  width: 40vmax; height: 40vmax;
  left: -5vmax; bottom: 20vmax;
  background: radial-gradient(circle, #00d4ff 0%, transparent 60%);
}

.grain {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
  mix-blend-mode: overlay;
}

/* ============= NAV ============= */
.nav {
  position: fixed;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 22px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-0);
  font-weight: 500;
}
/* equalizer bars — nav dot + status live indicator */
.nav .brand .dot,
.live-dot {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav .brand .dot span,
.live-dot span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #4ade80;
  transform-origin: bottom;
}
.nav .brand .dot span:nth-child(1),
.live-dot span:nth-child(1) { height: 5px; animation: bar-eq 1.3s ease-in-out infinite 0s; }
.nav .brand .dot span:nth-child(2),
.live-dot span:nth-child(2) { height: 9px; animation: bar-eq 1.3s ease-in-out infinite 0.22s; }
.nav .brand .dot span:nth-child(3),
.live-dot span:nth-child(3) { height: 6px; animation: bar-eq 1.3s ease-in-out infinite 0.44s; }
@keyframes bar-eq {
  0%, 100% { transform: scaleY(0.3); opacity: 0.45; }
  50%       { transform: scaleY(1);   opacity: 1; }
}
.nav .links {
  display: flex; gap: 2px;
  margin-left: 24px;
}
.nav .links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-1);
  transition: background 0.2s, color 0.2s;
}
.nav .links a:hover { background: var(--glass-bg); color: var(--ink-0); }
.nav .cta {
  margin-left: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink-0);
  color: var(--bg-0);
  font-weight: 500;
  transition: transform 0.2s;
}
.nav .cta:hover { transform: scale(1.04); }

@media (max-width: 720px) {
  .nav {
    left: 12px; right: 12px;
    transform: none;
    width: auto;
    justify-content: space-between;
    padding: 10px 10px 10px 18px;
    font-size: 12px;
    border-radius: 18px;
  }
  .nav .links { display: none; }
  .nav .brand .dot { display: none; }
}

/* ============= TYPE ============= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}
.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent-2);
}

.section { position: relative; z-index: 1; padding: var(--section-pad) var(--gutter); scroll-snap-align: start; }
.wrap { max-width: var(--maxw); margin: 0 auto; position: relative; }

/* ============= HERO ============= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 140px var(--gutter) 80px;
  scroll-snap-align: start;
}
.hero .wrap { width: 100%; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  margin-bottom: 60px;
}
.hero-meta .group { display: flex; gap: 28px; }
.hero-meta .k { color: var(--ink-3); }
.hero-meta .v { color: var(--ink-1); margin-left: 6px; }

.hero h1 {
  font-size: clamp(40px, 8vw, 128px);
  line-height: 0.92;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.055em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}
.hero h1 .amp {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  padding: 0 0.06em;
}
.hero h1 .underline {
  position: relative;
  white-space: nowrap;
}
.hero h1 .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.05em;
  height: 0.05em;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: drawUnderline 1.4s cubic-bezier(0.7, 0, 0.3, 1) 1.4s forwards;
}
@keyframes drawUnderline { to { transform: scaleX(1); } }

.hero-foot {
  margin-top: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: end;
}
.hero-foot .bio {
  max-width: 380px;
  color: var(--ink-1);
  font-size: 16px;
  line-height: 1.55;
}
.hero-foot .bio strong { color: var(--ink-0); font-weight: 500; }

.hero-portrait {
  position: relative;
  width: clamp(140px, 14vw, 220px);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(135deg, #2a2e55 0%, #4b3a6a 100%);
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: contrast(1.05) saturate(0.95);
}
.hero-portrait::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 10%, rgba(255, 138, 76, 0.25), transparent 50%),
    linear-gradient(180deg, transparent 50%, rgba(7,8,15,0.4) 100%);
  pointer-events: none;
}

.hero-scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.hero-scroll-cue .arrow {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--ink-2), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 760px) {
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-meta .group { gap: 18px; flex-wrap: wrap; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
  .hero-portrait { justify-self: center; width: clamp(160px, 55vw, 260px); }
}

/* ============= STATS ============= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--glass-stroke);
  border: 1px solid var(--glass-stroke);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.stat {
  padding: 36px 28px;
  background: var(--glass-bg);
  display: flex; flex-direction: column; gap: 8px;
}
.stat .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(48px, 5vw, 80px);
  line-height: 1;
  color: var(--ink-0);
  font-weight: 400;
}
.stat .num .plus { color: var(--accent); }
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.stat .sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.4;
}
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============= ABOUT / WORK PHILOSOPHY ============= */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about .sticky-col {
  position: sticky;
  top: 120px;
}
.about h2 {
  font-size: clamp(40px, 5.5vw, 84px);
  line-height: 1;
}
.about h2 .italic-display { display: block; }
.about-body {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.5;
  color: var(--ink-1);
  letter-spacing: -0.015em;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.about-body p { margin: 0; }
.about-body .scrub-word {
  color: var(--ink-3);
  transition: color 0.3s ease;
}
.about-body .scrub-word.lit {
  color: var(--ink-0);
}
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about .sticky-col { position: static; }
}

/* ============= TECH STACK ============= */
.stack-wrap {
  position: relative;
  z-index: 1;
}
.stack-pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0 var(--gutter);
}
.stack-head {
  max-width: var(--maxw);
  margin: 0 auto 40px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.stack-head h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  max-width: 600px;
}
.stack-head .progress {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}
.stack-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tech {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.3s, border-color 0.3s;
  cursor: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
}
.tech::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}
.tech:hover {
  background: var(--glass-bg-strong);
  border-color: var(--glass-stroke-strong);
  transform: translateY(-4px);
}
.tech:hover::before { opacity: 0.18; }
.tech .tech-icon {
  width: 40px; height: 40px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tech:hover .tech-icon { transform: scale(1.1) rotate(-3deg); }
.tech .name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
  text-align: center;
}
[data-theme="light"] .tech .tech-icon { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12)); }

@media (max-width: 900px) {
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
  .stack-wrap { height: auto; }
  .stack-pin { position: static; height: auto; overflow: visible; padding: var(--section-pad) var(--gutter); }
}
@media (max-width: 560px) {
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .stack-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ============= PORTFOLIO HORIZONTAL ============= */
.portfolio-wrap {
  position: relative;
  z-index: 1;
}
.portfolio-pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 80px var(--gutter) 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.portfolio-head h2 {
  font-size: clamp(36px, 4.5vw, 64px);
}
.portfolio-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}
.portfolio-track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 var(--gutter);
  will-change: transform;
}
.case {
  flex: 0 0 auto;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}
.case.size-lg { width: 64vw; max-width: 820px; height: 62vh; }
.case.size-md { width: 44vw; max-width: 580px; height: 56vh; }
.case.size-sm { width: 28vw; max-width: 380px; height: 46vh; }
.case .thumb {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.case .thumb-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 0.6s ease;
}
.case:hover .thumb-bg { transform: scale(1.1); }
.case .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 8, 15, 0.85) 100%);
}
.case .num {
  position: absolute;
  top: 16px; left: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  z-index: 2;
  letter-spacing: 0.08em;
}
.case .year {
  position: absolute;
  top: 16px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  z-index: 2;
}
.case .info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  z-index: 2;
}
.case .info-left { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.case h3 {
  font-size: clamp(22px, 2.2vw, 32px);
  color: #fff;
  line-height: 1.05;
}
.case h3 .it {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-2);
}
.case-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.case-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(60px, 10vw, 140px);
  color: rgba(255,255,255,0.13);
  letter-spacing: -0.04em;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  text-align: center;
  line-height: 1;
}
.case .tags {
  display: flex; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case .open {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 auto;
  transition: background 0.2s, transform 0.2s;
}
.case .open:hover { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }

/* size-lg layout with separate panel */
.case.size-lg .info {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
}

.portfolio-counter {
  position: absolute;
  bottom: 36px; left: var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 16px;
  z-index: 5;
}
.portfolio-counter .bar {
  width: 200px; height: 1px;
  background: var(--glass-stroke);
  position: relative;
  overflow: hidden;
}
.portfolio-counter .bar::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--p, 5%);
  background: var(--accent);
}
.portfolio-hint {
  position: absolute;
  bottom: 36px; right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  z-index: 5;
  display: flex; align-items: center; gap: 8px;
}
.portfolio-hint .ico { font-size: 14px; color: var(--accent); }

@media (max-width: 820px) {
  .portfolio-wrap { height: auto; }
  .portfolio-pin { position: static; height: auto; overflow: visible; }
  .portfolio-track {
    flex-direction: column;
    gap: 16px;
    padding: 0 var(--gutter) 40px;
  }
  .case.size-lg, .case.size-md, .case.size-sm {
    width: 100%;
    height: 56vh;
    flex-shrink: unset;
  }
  .portfolio-counter { position: static; padding: 0 var(--gutter) 16px; }
  .portfolio-hint { display: none; }
}

/* ============= NOW PLAYING / BUILDING ============= */
.now-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.glass-card .head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.glass-card .head .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
}
.glass-card .head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

/* terminal building card */
.building .term {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-1);
}
.building .term .prompt { color: var(--accent); margin-right: 8px; }
.building .term .comment { color: var(--ink-3); }
.building .term .str { color: #9ee37d; }
.building .term .kw { color: #7ab8ff; }
.building .term .caret {
  display: inline-block; width: 7px; height: 14px;
  background: var(--accent); vertical-align: middle;
  margin-left: 2px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.building .proj-line { display: block; }

.spotify h4 {
  font-size: 18px;
  margin: 0 0 4px;
  font-weight: 500;
}
.spotify .artist {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.spotify .bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 36px;
  margin-bottom: 14px;
}
.spotify .bars span {
  flex: 1;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}
.spotify .bars span:nth-child(1) { animation-delay: 0s; }
.spotify .bars span:nth-child(2) { animation-delay: 0.15s; }
.spotify .bars span:nth-child(3) { animation-delay: 0.3s; }
.spotify .bars span:nth-child(4) { animation-delay: 0.45s; }
.spotify .bars span:nth-child(5) { animation-delay: 0.6s; }
.spotify .bars span:nth-child(6) { animation-delay: 0.75s; }
.spotify .bars span:nth-child(7) { animation-delay: 0.4s; }
.spotify .bars span:nth-child(8) { animation-delay: 0.2s; }
@keyframes bar {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}
.spotify .track-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}

.uptime .big {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
}
.uptime .lbl {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 8px;
}
.uptime .grid7 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 18px;
}
.uptime .grid7 span {
  aspect-ratio: 1;
  background: var(--glass-stroke);
  border-radius: 3px;
}
.uptime .grid7 span.on { background: var(--accent); }
.uptime .grid7 span.partial { background: rgba(255,138,76,0.4); }

@media (max-width: 820px) {
  .now-row { grid-template-columns: 1fr; }
}

/* ============= MARQUEE ============= */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 24px 0;
  border-top: 1px solid var(--glass-stroke);
  border-bottom: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
}
.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 60px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  color: var(--ink-1);
  white-space: nowrap;
}
.marquee-item::after {
  content: "✦";
  color: var(--accent);
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 18px;
}
@media (max-width: 720px) {
  .marquee { padding: 16px 0; }
  .marquee-item { font-size: 18px; gap: 36px; }
  .marquee-item::after { font-size: 11px; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============= CONTACT ============= */
.contact { position: relative; z-index: 1; scroll-snap-align: start; }
.contact-wrap {
  text-align: center;
  position: relative;
  padding: clamp(120px, 14vw, 200px) var(--gutter);
}
.contact h2 {
  font-size: clamp(40px, 7vw, 112px);
  line-height: 0.95;
}
.contact h2 .italic-display { color: var(--accent); }
.contact-sub {
  margin: 32px auto 48px;
  max-width: 540px;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.5;
}
.contact-cta {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 22px 32px;
  background: var(--ink-0);
  color: var(--bg-0);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s, gap 0.2s;
}
.contact-cta:hover { transform: scale(1.03); gap: 28px; }
.contact-cta .arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #000;
}
.contact-channels {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.contact-channels a {
  padding: 12px 22px;
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-1);
  letter-spacing: 0.06em;
  transition: background 0.2s, border-color 0.2s;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
}
.contact-channels a:hover { background: var(--glass-bg-strong); border-color: var(--accent); color: var(--ink-0); }

footer {
  padding: 40px var(--gutter);
  border-top: 1px solid var(--glass-stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
footer .sig { color: var(--ink-1); }

@media (max-width: 720px) {
  footer { flex-direction: column; gap: 12px; text-align: center; }
}

/* ============= SECTION HEAD SHARED ============= */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 56px;
  gap: 24px;
}
.section-head h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  max-width: 640px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ============= FLOATING BG OBJECTS ============= */
.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.float-obj {
  position: absolute;
  will-change: transform;
  user-select: none;
  line-height: 1;
}
.float-sym {
  font-family: var(--font-mono);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.02em;
}
.float-shape {
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.float-circle {
  border-radius: 50%;
}

/* ============= PRELOADER ============= */
#preloader {
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.55s;
}
#preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.pre-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pre-track {
  width: 72px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
}
.pre-bar {
  height: 100%;
  width: 0;
  background: var(--accent, #ff8a4c);
  border-radius: 1px;
  animation: pre-fill 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pre-fill {
  0%   { width: 0%; }
  50%  { width: 60%; }
  80%  { width: 82%; }
  100% { width: 92%; }
}
.pre-bar.is-complete {
  animation: none;
  width: 100%;
  transition: width 0.2s ease;
}

/* ============= BACK TO TOP ============= */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 200;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-stroke);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, color 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============= UTIL ============= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.t-item.reveal.is-in {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* tilt for 3d hover */
.tilt { transform-style: preserve-3d; perspective: 1000px; transition: transform 0.2s; }

/* ============= TIMELINE ============= */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--glass-stroke-strong), var(--glass-stroke), transparent);
}
.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 24px;
  padding-bottom: 56px;
}
.t-item:last-child { padding-bottom: 0; }
.t-mark {
  position: relative;
  padding-top: 8px;
}
.t-dot {
  position: relative;
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--glass-stroke-strong);
  z-index: 2;
}
.t-dot.is-current {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 138, 76, 0.15), 0 0 20px var(--accent);
}
.t-dot.is-current::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: tdotPulse 2s ease-in-out infinite;
}
@keyframes tdotPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.6); opacity: 0; }
}
.t-body {
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 22px 26px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.t-body:hover {
  background: var(--glass-bg-strong);
  border-color: var(--glass-stroke-strong);
  transform: translateX(4px);
}
.t-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.t-head h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--ink-0);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.t-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.t-period .badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.t-co {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.t-co:hover { color: var(--accent-2); }
.t-bullets {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.t-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-1);
  line-height: 1.55;
}
.t-bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .t-item { grid-template-columns: 24px 1fr; gap: 16px; }
  .timeline::before { left: 7px; }
  .t-dot { width: 14px; height: 14px; }
  .t-body { padding: 18px 20px; }
  .t-head { flex-direction: column; gap: 6px; }
}

