/* ============================================================
   NOORA ROKNI — personal homepage
   Aesthetic: sketchbook turned screen.
   Palette pulled from the Photostat cover.
   ============================================================ */

:root {
  /* palette: cream */
  --bg: #F5EFE6;
  --bg-2: #EFE6D8;
  --ink: #1A1A2E;
  --ink-soft: #4A4A6A;
  --paper: #FFFBF4;
  --line: #1A1A2E;

  /* accents (tweakable) */
  --c-teal:    #2BA89B;
  --c-purple:  #7C3AED;
  --c-magenta: #E54B9B;
  --c-orange:  #F4A261;
  --c-sky:     #5BB4F0;
  --c-yellow:  #FFD166;

  --accent: var(--c-purple);
  --accent-2: var(--c-magenta);
  --accent-3: var(--c-teal);

  --radius: 20px;
  --radius-lg: 32px;
  --shadow-card: 0 1px 0 var(--ink), 6px 8px 0 var(--ink);
  --shadow-card-hover: 0 1px 0 var(--ink), 10px 14px 0 var(--ink);

  --motion: 1; /* multiplied into durations */
}

[data-theme="light"] {
  --bg: #F7F7F5;
  --bg-2: #ECECE8;
  --ink: #111111;
  --ink-soft: #5A5A5A;
  --paper: #FFFFFF;
  --line: #111111;
  --accent: #2C5DFF;
  --accent-2: #5BB4F0;
  --accent-3: #111111;
}
[data-theme="light"] .blob.b1 { background: #5BB4F0; opacity: .35; }
[data-theme="light"] .blob.b2 { background: #2C5DFF; opacity: .25; }
[data-theme="light"] .blob.b3 { background: #C8D4FF; opacity: .35; }
[data-theme="light"] .blob.b4 { background: #E8EFFF; opacity: .4; }

[data-theme="dark"] {
  --bg: #0E0E12;
  --bg-2: #16161C;
  --ink: #F5F5F2;
  --ink-soft: #A3A3AD;
  --paper: #1B1B22;
  --line: #F5F5F2;
  --accent: #5BB4F0;
  --accent-2: #2C5DFF;
  --accent-3: #FFFFFF;
  --shadow-card: 0 1px 0 #000, 6px 8px 0 #000;
  --shadow-card-hover: 0 1px 0 #000, 10px 14px 0 #000;
}
[data-theme="dark"] .blob { mix-blend-mode: screen; opacity: .25; }
[data-theme="dark"] .blob.b1 { background: #5BB4F0; }
[data-theme="dark"] .blob.b2 { background: #2C5DFF; }
[data-theme="dark"] .blob.b3 { background: #1E3A8A; }
[data-theme="dark"] .blob.b4 { background: #5BB4F0; }
[data-theme="dark"] .bg-grain { mix-blend-mode: overlay; opacity: .25; }

[data-theme="blueprint"] {
  --bg: #0B1A3A;
  --bg-2: #122456;
  --ink: #FFFFFF;
  --ink-soft: #9BC4F2;
  --paper: #FFFFFF;
  --line: #000000;
  --accent: #5BB4F0;
  --accent-2: #1E3A8A;
  --accent-3: #FFFFFF;
  --shadow-card: 0 1px 0 #000, 6px 8px 0 #000;
  --shadow-card-hover: 0 1px 0 #000, 10px 14px 0 #000;
}
[data-theme="blueprint"] .story,
[data-theme="blueprint"] .featured-card,
[data-theme="blueprint"] .about-card,
[data-theme="blueprint"] .converter,
[data-theme="blueprint"] .skill {
  color: #0B1A3A;
}
[data-theme="blueprint"] .blob { mix-blend-mode: screen; opacity: .35; }
[data-theme="blueprint"] .blob.b1 { background: #5BB4F0; }
[data-theme="blueprint"] .blob.b2 { background: #1E3A8A; }
[data-theme="blueprint"] .blob.b3 { background: #FFFFFF; opacity: .12; }
[data-theme="blueprint"] .blob.b4 { background: #5BB4F0; }
[data-theme="blueprint"] .bg-grain { mix-blend-mode: overlay; opacity: .25; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s ease, color .5s ease;
  position: relative;
}

a { color: inherit; }

/* ------------------------------------------------------------
   Background motion
   ------------------------------------------------------------ */
.bg-stage {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  mix-blend-mode: multiply;
  will-change: transform;
}

.blob.b1 { width: 520px; height: 520px; background: var(--c-teal);    top: -120px; left: -80px;  animation: drift1 22s ease-in-out infinite; }
.blob.b2 { width: 460px; height: 460px; background: var(--c-magenta); top: 30%;    right: -120px; animation: drift2 26s ease-in-out infinite; }
.blob.b3 { width: 600px; height: 600px; background: var(--c-purple);  bottom: -180px; left: 20%; animation: drift3 30s ease-in-out infinite; }
.blob.b4 { width: 380px; height: 380px; background: var(--c-orange);  top: 55%; left: 5%; animation: drift4 24s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px, 60px) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-100px, 80px) scale(.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.1); } }
@keyframes drift4 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-60px, -80px) scale(1.2); } }

.bg-grain {
  position: absolute; inset: 0;
  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'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .35; mix-blend-mode: multiply;
}
[data-theme="midnight"] .bg-grain { opacity: .25; mix-blend-mode: screen; }

body.no-motion .blob { animation: none !important; }

/* ------------------------------------------------------------
   Layout shell
   ------------------------------------------------------------ */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 36px 80px;
}

@media (max-width: 720px) {
  .shell { padding: 20px 18px 60px; }
}

/* ------------------------------------------------------------
   Nav
   ------------------------------------------------------------ */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0 28px;
  position: relative;
}
.nav-mark {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: 'Instrument Serif', serif;
  font-size: 28px; font-style: italic; line-height: 1;
}
.nav-mark .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  transform: translateY(-2px);
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none; color: var(--ink);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 720px) {
  .nav-links { gap: 16px; font-size: 11px; letter-spacing: .02em; }
}
@media (max-width: 380px) {
  .nav-links { gap: 12px; font-size: 10px; }
  .hero-tag { font-size: 11px; letter-spacing: .06em; }
}

/* ------------------------------------------------------------
   Hero (split layout)
   ------------------------------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  padding: 32px 0 80px;
  align-items: start;
}
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; gap: 40px; } }

.hero-left { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 var(--accent-3);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent-3) 60%, transparent); }
  70% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-name {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(64px, 11vw, 156px);
  line-height: .92;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.hero-name .first { display: block; }
.hero-name .last  {
  display: block;
  font-style: italic;
  color: var(--accent);
  position: relative;
}
.hero-name .last .underline {
  position: absolute; left: 0; right: 8%; bottom: 8px;
  height: 8px; background: var(--accent-2); opacity: .35;
  border-radius: 8px;
  transform-origin: left;
  animation: dash-in 1.2s .6s cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes dash-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: .14em;
  color: var(--ink-soft);
  margin: 4px 0 28px;
}
.hero-tag .sep { color: var(--accent); margin: 0 8px; }

.typewriter-line {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 36px;
  min-height: 2.8em;
  max-width: 36ch;
}
.typewriter-line .quote-mark { color: var(--accent); font-size: 1.6em; line-height: 0; vertical-align: -0.3em; margin-right: 4px; }
.typewriter-cursor {
  display: inline-block; width: 2px; height: 0.95em;
  background: var(--accent); vertical-align: -0.1em;
  margin-left: 3px;
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* skills */
.skills-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: .22em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.skills-row {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
}
.skill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  transform: rotate(var(--rot, 0deg));
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .25s, color .25s;
  box-shadow: 2px 3px 0 var(--ink);
  cursor: default;
}
.skill:nth-child(1) { --rot: -1.2deg; }
.skill:nth-child(2) { --rot:  1.5deg; }
.skill:nth-child(3) { --rot: -0.8deg; }
.skill:nth-child(4) { --rot:  1.1deg; }
.skill:nth-child(5) { --rot: -1.4deg; }
.skill:hover {
  transform: rotate(0deg) translateY(-2px) scale(1.04);
  background: var(--accent);
  color: var(--paper);
}
.skill .ico {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.skill:hover .ico { background: var(--paper); }

/* hero video clip */
.hero-clip {
  position: relative;
  display: inline-block;
  margin: 0 0 28px;
  padding: 10px 10px 36px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transform: rotate(-2.5deg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.hero-clip:hover { transform: rotate(0deg) translateY(-2px); }
.hero-clip video {
  display: block;
  width: 240px;
  max-width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
}
.hero-clip-caption {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--ink);
  pointer-events: none;
}
.hero-clip::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  width: 60px; height: 18px;
  background: color-mix(in oklch, var(--accent) 60%, white);
  opacity: .8;
  border: 1px dashed color-mix(in oklch, var(--ink) 30%, transparent);
}

/* fade in cascade */
.cascade > * {
  opacity: 0; transform: translateY(14px);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards;
}
.cascade > *:nth-child(1) { animation-delay: 0.05s; }
.cascade > *:nth-child(2) { animation-delay: 0.20s; }
.cascade > *:nth-child(3) { animation-delay: 0.35s; }
.cascade > *:nth-child(4) { animation-delay: 0.50s; }
.cascade > *:nth-child(5) { animation-delay: 0.65s; }
.cascade > *:nth-child(6) { animation-delay: 0.80s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------
   Hero right (sidebar story preview + sticker)
   ------------------------------------------------------------ */
.hero-right {
  position: relative;
  padding-top: 16px;
}

.featured-card {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-card);
  transform: rotate(1.5deg);
}
.featured-card .featured-tag {
  position: absolute; top: -14px; left: 22px;
  background: var(--accent); color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  border: 1.5px solid var(--line);
}
.featured-card .featured-cover {
  width: 100%;
  aspect-ratio: 5/8;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: #cfe9e4;
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
  display: block;
}
.featured-card h3 {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  font-size: 28px; line-height: 1.05;
  margin: 14px 0 4px;
}
.featured-card .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
}
.featured-card .meta .dot { width: 4px; height: 4px; background: var(--ink-soft); border-radius: 50%; }

/* sticker */
.sticker {
  position: absolute; right: -20px; top: -8px;
  width: 124px; height: 124px;
  display: grid; place-items: center;
  font-family: 'Caveat', cursive;
  font-weight: 700; font-size: 18px; line-height: 1.05;
  text-align: center; color: var(--paper);
  background: var(--accent-2);
  border-radius: 50%;
  border: 1.5px solid var(--line);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(-12deg);
  animation: wobble 5s ease-in-out infinite;
  z-index: 2;
}
@keyframes wobble { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(-6deg); } }

.scribble {
  position: absolute; left: -28px; top: 40%;
  font-family: 'Caveat', cursive;
  font-size: 22px; color: var(--accent-3);
  transform: rotate(-90deg);
  white-space: nowrap;
  letter-spacing: .04em;
}

/* ------------------------------------------------------------
   Section header
   ------------------------------------------------------------ */
.section {
  padding: 60px 0;
  position: relative;
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 80px);
  line-height: .95;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
}
.section-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.section-meta .num {
  background: var(--ink); color: var(--bg);
  padding: 4px 8px; border-radius: 4px;
}

/* ------------------------------------------------------------
   Stories grid
   ------------------------------------------------------------ */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 980px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .stories-grid { grid-template-columns: 1fr; } }

.story {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, rotate .35s;
  transform-origin: center bottom;
}
.story:hover {
  transform: translate(-4px, -6px);
  box-shadow: var(--shadow-card-hover);
}
.story:nth-child(1) { rotate: -0.8deg; }
.story:nth-child(2) { rotate:  0.6deg; }
.story:nth-child(3) { rotate: -0.4deg; }
.story:hover { rotate: 0deg; }

.story-cover {
  position: relative;
  aspect-ratio: 5/8;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  overflow: hidden;
  background: var(--bg-2);
}
.story-cover img, .story-cover .svg-cover {
  width: 100%; height: 100%; display: block; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.story:hover .story-cover img,
.story:hover .story-cover .svg-cover { transform: scale(1.04); }

.story-tape {
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 84px; height: 22px;
  background: color-mix(in oklch, var(--accent-2) 70%, white);
  opacity: .85;
  border: 1px dashed color-mix(in oklch, var(--ink) 30%, transparent);
  z-index: 2;
}

.story-genre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
  margin: 18px 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.story-genre::before {
  content: ""; width: 14px; height: 1.5px; background: var(--accent);
}

.story-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  margin: 0 0 10px;
}
.story-title em { font-style: italic; }

.story-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 20px;
  flex: 1;
  text-wrap: pretty;
}

.story-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1.5px dashed color-mix(in oklch, var(--ink) 25%, transparent);
  padding-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.story-foot .read { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.story-foot .read .arrow { transition: transform .3s; }
.story:hover .story-foot .read .arrow { transform: translateX(4px); }
.story-foot .stat { color: var(--ink-soft); }

/* ------------------------------------------------------------
   About block
   ------------------------------------------------------------ */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) { .about { grid-template-columns: 1fr; gap: 40px; } }

.about-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.about-card .pin {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-2);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 0 var(--ink);
}
.about-card .marg {
  font-family: 'Caveat', cursive;
  font-size: 22px; color: var(--accent-3);
  margin: 0 0 6px;
  transform: rotate(-2deg);
  display: inline-block;
}
.about-card h4 {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  font-size: 28px;
  margin: 0 0 16px;
}
.about-card .grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px;
  font-size: 13px;
}
.about-card .grid div span:first-child {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--ink-soft); margin-bottom: 4px;
}

.about-text p {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  text-wrap: pretty;
  margin: 0 0 18px;
}
.about-text p em { color: var(--accent); }
.about-text .small {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ------------------------------------------------------------
   Converter
   ------------------------------------------------------------ */
.converter-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: stretch;
}
@media (max-width: 880px) { .converter-wrap { grid-template-columns: 1fr; } }

.converter-blurb h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  margin: 0 0 16px;
}
.converter-blurb p { color: var(--ink-soft); line-height: 1.6; max-width: 38ch; font-size: 14px; }
.converter-blurb .badge {
  display: inline-flex; gap: 8px; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.converter {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.converter .top-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.converter .traffic { display: flex; gap: 6px; }
.converter .traffic span {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--line);
}
.converter .traffic span:nth-child(1) { background: var(--c-magenta); }
.converter .traffic span:nth-child(2) { background: var(--c-yellow); }
.converter .traffic span:nth-child(3) { background: var(--c-teal); }

.field { margin-bottom: 16px; }
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  display: block; margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: box-shadow .2s, border-color .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus {
  box-shadow: 3px 4px 0 var(--accent);
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.swap-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background-color .2s;
  margin-bottom: 4px;
}
.swap-btn:hover { background: var(--accent); color: var(--paper); }
.swap-btn:active { transform: rotate(180deg); }

.convert-btn {
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--line);
  background: var(--accent);
  color: var(--paper);
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 15px;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  margin-top: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.convert-btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.convert-btn:active { transform: translate(1px, 1px); box-shadow: 1px 2px 0 var(--ink); }

.result {
  margin-top: 20px;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: linear-gradient(0deg, color-mix(in oklch, var(--accent) 6%, transparent), transparent);
}
.result .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.result .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 500;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.2;
}
.result .value.error { color: var(--c-magenta); font-size: 18px; }
.result .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--ink-soft);
  margin-top: 10px;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.foot {
  margin-top: 60px;
  padding: 28px 0 8px;
  border-top: 1.5px solid color-mix(in oklch, var(--ink) 18%, transparent);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.foot .heart { color: var(--accent-2); }

/* ------------------------------------------------------------
   Tweaks-only dot indicators
   ------------------------------------------------------------ */
.theme-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.theme-chip {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .2s;
  position: relative;
}
.theme-chip:hover { transform: scale(1.12); }
.theme-chip.active::after {
  content: ""; position: absolute; inset: -5px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.theme-chip.blueprint { background: linear-gradient(135deg, #0B1A3A 50%, #5BB4F0 50%); }
.theme-chip.light     { background: linear-gradient(135deg, #FFFFFF 50%, #2C5DFF 50%); }
.theme-chip.dark      { background: linear-gradient(135deg, #0E0E12 50%, #5BB4F0 50%); }

/* ============================================================
   MOBILE PASS
   ============================================================ */
@media (max-width: 760px) {
  .shell { padding: 16px 18px 56px; }
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 26px; gap: 12px; }

  /* hero */
  .hero { padding: 18px 0 40px; gap: 32px; }
  .hero-name { font-size: clamp(52px, 17vw, 92px); }
  .typewriter-line { font-size: 20px; min-height: 3.4em; max-width: none; }
  .hero-clip { transform: rotate(-2deg); }
  .hero-clip video { width: 100%; }

  /* featured card: don't let sticker/scribble cause overflow */
  .hero, .hero-left, .hero-right { min-width: 0; }
  .hero-right { padding-top: 28px; overflow: visible; }
  .featured-card { transform: rotate(0.6deg); max-width: min(340px, 100%); margin: 0 auto; }
  .sticker { width: 92px; height: 92px; font-size: 15px; right: 4px; top: -8px; }
  .scribble { left: auto; right: 8px; top: -6px; transform: rotate(0deg); }

  /* skills wrap tighter */
  .skills-row { gap: 8px; }
  .skill { font-size: 12px; padding: 7px 12px; }
}

@media (max-width: 560px) {
  /* converter: stack from / to vertically with the swap between */
  .field-row { grid-template-columns: 1fr; gap: 14px; }
  .swap-btn { justify-self: center; margin: -2px 0; }
  .swap-btn svg { transform: rotate(90deg); }
  .converter, .about-card { padding: 22px 18px; }

  .result .value { font-size: 22px; }
  .hero-name { font-size: clamp(40px, 15vw, 80px); }

  /* about quick-stats: single column reads better on narrow */
  .about-card .grid { grid-template-columns: 1fr; gap: 12px; }

  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* avoid sideways scroll from rotated decorative bits */
@media (max-width: 760px) {
  body { overflow-x: hidden; }
}
