/* =====================================================================
   Ramesh Maharaddi — Portfolio v4
   SPLIT-SCREEN: fixed identity rail (left) + scrolling content (right)
   Light theme · duotone photo · zero dependencies · handcrafted fresh
   ===================================================================== */

:root {
  /* warm light canvas */
  --paper:   #f4f1ea;   /* warm cream */
  --paper-2: #fbf9f4;   /* card */
  --ink:     #1b1a18;   /* near-black */
  --ink-2:   #57534c;
  --ink-3:   #97928a;
  --line:    #e2ddd2;

  /* duotone + accent: teal over warm */
  --accent:   #0d9488;   /* deep teal */
  --accent-2: #f97316;   /* warm amber counter */
  --duo-dark: #103b3a;   /* duotone shadow tone */
  --duo-light:#ffe6cc;   /* duotone highlight tone */

  --panel-w: 28vw;       /* fixed left rail width (narrower) */
  --maxc: 820px;         /* right content column max */

  --display: "Space Grotesk", "Manrope", system-ui, sans-serif;  /* headings */
  --sans: "Manrope", "Inter", system-ui, -apple-system, sans-serif; /* body */
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gut: clamp(22px, 4vw, 64px);
  --r: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }

.grad-text { color: var(--accent); }
.mono { font-family: var(--mono); }

/* scroll progress (top of right column) */
.progress { position: fixed; top: 0; right: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); z-index: 100; transition: width 0.1s linear; }

/* =====================================================================
   LEFT RAIL — fixed identity panel
   ===================================================================== */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--panel-w);
  display: flex; flex-direction: column;
  padding: clamp(26px, 3vw, 48px);
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto; overflow-x: hidden;
  z-index: 10;
}
.rail::-webkit-scrollbar { width: 0; }
/* WebGL canvas sits behind rail content */
#gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; }
.rail > * { position: relative; z-index: 1; }
.rail::after { /* vignette so text reads over canvas + photo */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(27,26,24,0.30), rgba(27,26,24,0.0) 30%, rgba(27,26,24,0.55) 78%, rgba(27,26,24,0.92));
  pointer-events: none;
}

.rail-top { display: flex; align-items: center; justify-content: flex-end; }
/* simple dot + text (no pill, no glow ring) */
.rail-avail {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); display: inline-flex; align-items: center; gap: 8px; opacity: 0.9;
}
.rail-avail .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80, 0 0 14px rgba(74,222,128,0.6); }

/* duotone photo — SMALL, CENTERED, fixed size (no flex grow → typing can't resize it) */
.portrait {
  position: relative; flex: 0 0 auto;
  width: clamp(150px, 60%, 230px);
  aspect-ratio: 1 / 1;
  margin: clamp(20px,3vh,40px) auto;       /* auto = horizontally centered */
  border-radius: 50%;                       /* circular portrait */
  overflow: hidden;
  box-shadow: 0 24px 50px -22px rgba(0,0,0,0.65);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  filter: grayscale(1) contrast(1.06) brightness(1.04);
  display: block;
}
.portrait::before { /* duotone tint via blended gradient */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(150deg, var(--duo-dark), transparent 55%),
              linear-gradient(330deg, var(--accent), transparent 60%);
  mix-blend-mode: screen; opacity: 0.55;
}
.portrait::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18); border-radius: 50%; }

.rail-id { text-align: center; }
/* cursive name (Pacifico), teal, smooth neon glow, one line, centered + contained */
.rail-name {
  font-family: "Pacifico", cursive; font-weight: 400;
  font-size: clamp(18px, 3.3vw, 31px); line-height: 1.3; letter-spacing: 0;
  white-space: nowrap; color: #2dd4bf;
  width: 100%; text-align: center;
  text-shadow: 0 0 12px rgba(45,212,191,0.55), 0 0 28px rgba(45,212,191,0.32);
  animation: railGlow 3.2s ease-in-out infinite;
}
@keyframes railGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(45,212,191,0.45), 0 0 22px rgba(45,212,191,0.26); }
  50%      { text-shadow: 0 0 18px rgba(45,212,191,0.75), 0 0 42px rgba(45,212,191,0.48); }
}
@media (prefers-reduced-motion: reduce) { .rail-name { animation: none; } }
.rail-cta { justify-content: center; }
.rail-foot { justify-content: center; }

.rail-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 9px 16px; border-radius: 100px; transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--accent-2); color: #fff; box-shadow: 0 12px 26px -10px rgba(255,90,54,0.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(255,90,54,0.85); }
.btn-ghost { color: var(--paper); border: 1px solid rgba(255,255,255,0.28); }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }

.rail-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; gap: 14px; }
.rail-social { display: flex; gap: 10px; justify-content: center; margin: 20px 0 0; }
/* light circle so each logo shows in its TRUE brand color */
.rail-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fbf9f4; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.rail-social a svg { width: 17px; height: 17px; }
.rail-social a:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 8px 18px -6px rgba(0,0,0,0.5); }
/* brand colors (order: LinkedIn, GitHub, X, Medium, Substack) */
.rail-social a:nth-child(1) { color: #0A66C2; }   /* LinkedIn */
.rail-social a:nth-child(2) { color: #181717; }   /* GitHub */
.rail-social a:nth-child(3) { color: #000000; }   /* X */
.rail-social a:nth-child(4) { color: #000000; }   /* Medium */
.rail-social a:nth-child(5) { color: #FF6719; }   /* Substack */

/* in-rail section nav (scroll-spy) */

/* =====================================================================
   RIGHT COLUMN — scrolling content
   ===================================================================== */
.content {
  margin-left: var(--panel-w);
  min-height: 100vh;
  padding: clamp(60px, 8vh, 120px) var(--gut) 80px;
}
.content-inner { max-width: var(--maxc); margin-inline: auto; }

/* sticky in-content section nav (moved out of the rail) */
.sec-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 12px 0; margin-bottom: 8px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sec-nav a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); padding: 7px 13px; border-radius: 100px; transition: color 0.2s, background 0.2s; }
.sec-nav a:hover { color: var(--ink); background: var(--bg-sink, var(--paper-2)); }
.sec-nav a.active { color: #fff; background: var(--accent); }

.block { padding-block: clamp(48px, 7vh, 96px); border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.block:first-child { border-top: 0; padding-top: clamp(20px, 4vh, 48px); }
.block#about { border-top: 0; }
.block-tight { padding-top: clamp(8px, 2vh, 20px) !important; }
.block-tight .b-head { margin-bottom: 16px; }

/* ABOUT — static info cards (no flip) */
.about-cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
@media (min-width: 640px) { .about-cards { grid-template-columns: repeat(3, 1fr); } }
.ac {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2);
  padding: 22px; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
/* each About card a distinct accent color (icon + title + bullets) */
.ac { --c: var(--accent); }
.ac:nth-child(1) { --c: #0d9488; } /* teal */
.ac:nth-child(2) { --c: #2563eb; } /* blue */
.ac:nth-child(3) { --c: #db2777; } /* pink */
.ac:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 34px -20px color-mix(in srgb, var(--c) 40%, transparent); }
/* transparent colored icon (no box) */
.ac-ic { color: var(--c); margin-bottom: 12px; }
.ac-ic svg { width: 34px; height: 34px; }
.ac h3 { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; color: var(--c); }
.ac ul { display: flex; flex-direction: column; gap: 8px; }
.ac li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.ac li::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-top: 5px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }

.b-title .accent { color: var(--accent-2); }

/* HERO block (opens the content column) */
.hero-block { min-height: min(82vh, 760px); display: flex; flex-direction: column; justify-content: center; padding-top: clamp(20px, 5vh, 60px); padding-bottom: clamp(40px, 6vh, 80px); }
.hero-tag { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; align-self: flex-start; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); border-radius: 100px; padding: 8px 18px; margin-bottom: 26px; }
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
/* blue separator dots between roles */
.hero-tag .bdot { width: 5px; height: 5px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 6px rgba(37,99,235,0.6); flex-shrink: 0; }
/* centered hero */
.hero-block.centered { align-items: center; text-align: center; }
.hero-block.centered .hero-tag { align-self: center; }

/* name — flowing script + glow */
.hero-name { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 7vw, 86px); line-height: 1.0; letter-spacing: -0.035em; white-space: nowrap; }
.hero-name .last { color: var(--accent-2); }
@media (max-width: 540px) { .hero-name { white-space: normal; } }

/* one-line bridging tagline (About essence, folded into hero) */
.hero-line { margin-top: 18px; font-size: clamp(15px, 1.7vw, 19px); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.hero-line b { color: var(--ink); font-weight: 700; }

/* credential strip — compact vertical columns, fits one row + dividers */
.hero-creds {
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  margin-top: 26px; padding: 16px clamp(6px, 1.5vw, 16px); width: 100%;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hero-creds li {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 2px clamp(6px, 1vw, 14px); position: relative; text-align: center;
}
.hero-creds li:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 30px; width: 1px; background: var(--line); }
.hero-creds li b { font-family: var(--display); font-size: clamp(16px, 1.7vw, 22px); font-weight: 700; color: var(--accent); letter-spacing: -0.01em; line-height: 1; }
.hero-creds li span { font-size: clamp(10px, 0.95vw, 11.5px); color: var(--ink-2); line-height: 1.3; }
/* phones: 2 columns, no dividers */
@media (max-width: 560px) {
  .hero-creds { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .hero-creds li::after { display: none; }
  .hero-creds li:last-child { grid-column: 1 / -1; }
}

/* hero social icons */
.hero-social { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.hero-social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s; }
.hero-social a svg { width: 18px; height: 18px; }
.hero-social a:hover { transform: translateY(-3px); background: var(--ink); color: var(--paper); box-shadow: var(--sh-2, 0 12px 26px -12px rgba(0,0,0,0.3)); }
.hero-social .hero-social-cv:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* ===== NEON / GLOW (subtle, tasteful; pauses on reduced-motion) ===== */
/* hero (light bg): glow the amber 'last' name + soft glow on rest */
.hero-name.neon { text-shadow: 0 0 16px rgba(27,26,24,0.10); }
.hero-name.neon .last { animation: neonPulse 3.4s ease-in-out infinite; }
.neon .neon-1 { text-shadow: 0 0 14px rgba(27,26,24,0.16); }
.neon .neon-2 { animation: neonPulse 3.4s ease-in-out infinite; }
@keyframes neonPulse {
  0%, 100% { text-shadow: 0 0 14px rgba(249,115,22,0.40), 0 0 30px rgba(249,115,22,0.18); }
  50%      { text-shadow: 0 0 22px rgba(249,115,22,0.70), 0 0 48px rgba(249,115,22,0.38); }
}
/* rail name on dark bg — brighter halo */
.rail-id .neon .neon-1 { text-shadow: 0 0 16px rgba(255,255,255,0.20); }

@media (prefers-reduced-motion: reduce) {
  .neon .neon-2, .hero-name.neon .last { animation: none; }
}
.hero-meta .m { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.hero-meta .m b { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }

.b-head { margin-bottom: clamp(28px, 4vh, 48px); }
.b-num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.b-title { font-family: var(--display); font-size: clamp(23px, 2.8vw, 34px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin-top: 10px; color: var(--ink); }
/* each section title in its own color */
#about    .b-title { color: #0d9488; }
#skills   .b-title { color: #2563eb; }
#stack    .b-title { color: #db2777; }
#work     .b-title { color: #ea580c; }
#websites .b-title { color: #7c3aed; }
#experience .b-title { color: #16a34a; }
#certs    .b-title { color: #0891b2; }
#awards   .b-title { color: #dc2626; }
/* the gradient .accent span inside titles → inherit the solid section color */
.b-title .accent { color: inherit; -webkit-text-fill-color: currentColor; background: none; }
.b-lede { margin-top: 12px; color: var(--ink-2); max-width: 56ch; font-size: clamp(14px, 1.3vw, 16px); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

/* lead paragraph (about) */
.lead { font-family: var(--display); font-size: clamp(17px, 1.9vw, 22px); font-weight: 600; line-height: 1.36; letter-spacing: -0.01em; margin-bottom: 20px; }
.about-body p { color: var(--ink-2); margin-bottom: 15px; }
.facts { margin-top: 24px; border-top: 1px solid var(--line); }
.facts .f { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.facts .fk { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.facts .fv { color: var(--ink); font-size: 14px; }

.chip { display: inline-block; font-size: 12.5px; padding: 5px 11px; border-radius: 100px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); margin: 2px 5px 2px 0; transition: border-color 0.2s, color 0.2s, transform 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }

/* stat row */
.stats { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 26px; }
.stats .s { display: flex; align-items: baseline; gap: 9px; font-size: 13px; color: var(--ink-2); }
.stats .s b { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }

/* SKILLS — accordion-ish list, one column (fits narrow content col) */
.skill-list { display: grid; gap: 10px; }
.skill { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); padding: 18px 20px; transition: border-color 0.25s, transform 0.25s; }
.skill:hover { border-color: var(--c, var(--accent)); transform: translateX(4px); }
/* each skill category a distinct icon color */
.skill:nth-child(11n+1)  { --c: #0d9488; }
.skill:nth-child(11n+2)  { --c: #2563eb; }
.skill:nth-child(11n+3)  { --c: #db2777; }
.skill:nth-child(11n+4)  { --c: #ea580c; }
.skill:nth-child(11n+5)  { --c: #7c3aed; }
.skill:nth-child(11n+6)  { --c: #16a34a; }
.skill:nth-child(11n+7)  { --c: #0891b2; }
.skill:nth-child(11n+8)  { --c: #d4a017; }
.skill:nth-child(11n+9)  { --c: #dc2626; }
.skill:nth-child(11n+10) { --c: #9333ea; }
.skill:nth-child(11n)    { --c: #2563eb; }
.skill-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
/* transparent colored icon (no box) */
.skill-head svg { width: 26px; height: 26px; color: var(--c, var(--accent)); background: none; flex-shrink: 0; }
.skill-head h3 { font-size: 14px; font-weight: 700; flex: 1; }
.skill-head .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tags .chip { font-size: 11.5px; padding: 4px 10px; margin: 0; }

/* colorful outlined chips — rounded-rectangle shape, each a different hue */
.skill-tags.colorful .chip {
  border-radius: 8px;                                          /* squarer, like the reference */
  background: color-mix(in srgb, var(--c) 12%, var(--paper-2));
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  color: var(--c);
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.skill-tags.colorful .chip:hover {
  background: color-mix(in srgb, var(--c) 20%, var(--paper-2));
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--c) 60%, transparent);
}
/* 13-hue palette in a scrambled (non-sequential) order so rows look randomized */
.skill-tags.colorful .chip:nth-child(13n+1)  { --c: #2563eb; } /* blue */
.skill-tags.colorful .chip:nth-child(13n+2)  { --c: #e8482b; } /* vermillion */
.skill-tags.colorful .chip:nth-child(13n+3)  { --c: #16a34a; } /* green */
.skill-tags.colorful .chip:nth-child(13n+4)  { --c: #9333ea; } /* purple */
.skill-tags.colorful .chip:nth-child(13n+5)  { --c: #d4a017; } /* gold */
.skill-tags.colorful .chip:nth-child(13n+6)  { --c: #0891b2; } /* cyan */
.skill-tags.colorful .chip:nth-child(13n+7)  { --c: #db2777; } /* pink */
.skill-tags.colorful .chip:nth-child(13n+8)  { --c: #0d9488; } /* teal */
.skill-tags.colorful .chip:nth-child(13n+9)  { --c: #ea580c; } /* orange */
.skill-tags.colorful .chip:nth-child(13n+10) { --c: #7c3aed; } /* violet */
.skill-tags.colorful .chip:nth-child(13n+11) { --c: #ca8a04; } /* amber */
.skill-tags.colorful .chip:nth-child(13n+12) { --c: #0ea5e9; } /* sky */
.skill-tags.colorful .chip:nth-child(13n)    { --c: #dc2626; } /* red */

/* AI STACK — numbered rows */
.layers { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.layer { background: var(--paper-2); padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; transition: background 0.25s; }
.layer:hover { background: var(--paper); }
/* each layer a distinct accent (title + number) */
.layer:nth-child(1) { --c: #0d9488; }
.layer:nth-child(2) { --c: #2563eb; }
.layer:nth-child(3) { --c: #db2777; }
.layer:nth-child(4) { --c: #ea580c; }
.layer:nth-child(5) { --c: #7c3aed; }
.layer:nth-child(6) { --c: #16a34a; }
.layer .li { font-family: var(--mono); font-size: 22px; font-weight: 800; color: color-mix(in srgb, var(--c, var(--accent)) 45%, var(--line)); line-height: 1; transition: color 0.25s; }
.layer:hover .li { color: var(--c, var(--accent)); }
.layer h3 { font-family: var(--display); font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; color: var(--c, var(--ink)); }
.layer .ltags { display: flex; flex-wrap: wrap; gap: 6px; }
.layer .ltags span { font-size: 12px; color: var(--ink-2); }
.layer .ltags span:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--ink-3); }

/* PROJECTS — stacked cards */
.proj { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); padding: 24px; margin-bottom: 14px; position: relative; overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.proj::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--accent), var(--accent-2)); transform: scaleY(0); transform-origin: top; transition: transform 0.4s var(--ease); }
.proj:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -24px rgba(30,26,40,0.4); border-color: transparent; }
.proj:hover::before { transform: scaleY(1); }
.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.proj-path { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 100px; color: #fff; background: var(--accent); }
.tag.shipped { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.proj h3 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--c, var(--ink)); }
/* each project title a distinct color */
.proj:nth-child(1) { --c: #0d9488; }
.proj:nth-child(2) { --c: #2563eb; }
.proj:nth-child(3) { --c: #db2777; }
.proj:nth-child(4) { --c: #ea580c; }
.proj:nth-child(5) { --c: #7c3aed; }
.proj:nth-child(6) { --c: #16a34a; }
.proj p { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.proj-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-stack .chip { font-size: 11px; padding: 3px 9px; margin: 0; }

/* WEBSITES — list links */
.weblist { display: grid; gap: 2px; }
.web { display: block; padding: 20px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.3s var(--ease); }
.web:first-child { border-top: 1px solid var(--line); }
.web:hover { padding-left: 12px; }
.web-name { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.025em; display: inline-flex; align-items: center; gap: 10px; color: var(--c, var(--ink)); }
/* each website title a distinct color */
.web:nth-child(1) { --c: #0d9488; }
.web:nth-child(2) { --c: #2563eb; }
.web:nth-child(3) { --c: #db2777; }
.web:nth-child(4) { --c: #ea580c; }
.web-name .ar { color: var(--c, var(--accent)); transition: transform 0.3s var(--ease); }
.web:hover .web-name .ar { transform: translate(4px,-4px); }
.web p { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; max-width: 52ch; }

/* FRONTIER — compact cards */

/* EXPERIENCE — vertical timeline with rail line */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.xp { position: relative; padding-bottom: 30px; }
.xp:last-child { padding-bottom: 0; }
.xp::before { content: ""; position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.xp.now::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(75,59,255,0.18); }
.xp .when { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.xp .when .nw { color: var(--accent); font-weight: 700; }
.xp .where { font-family: var(--display); font-size: 18px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.xp .role { font-size: 12.5px; font-weight: 700; color: var(--accent-2); margin: 2px 0 10px; }
.xp p { color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }
.xp ul li { display: flex; gap: 9px; padding: 3px 0; font-size: 13.5px; color: var(--ink-2); }
.xp ul li::before { content: "→"; color: var(--accent); flex-shrink: 0; }

/* CERTS */
.certs { display: grid; gap: 9px; }
.cert { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); padding: 14px 16px; transition: border-color 0.25s, transform 0.25s; }
.cert:hover { border-color: var(--c, var(--accent)); transform: translateX(3px); }
/* transparent icon (no box), colored glyph — each cert a different color */
.cert .ci { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; background: transparent; color: var(--c, var(--accent)); }
.cert .ci svg { width: 26px; height: 26px; }
.cert:nth-child(7n+1) { --c: #0d9488; }
.cert:nth-child(7n+2) { --c: #2563eb; }
.cert:nth-child(7n+3) { --c: #db2777; }
.cert:nth-child(7n+4) { --c: #ea580c; }
.cert:nth-child(7n+5) { --c: #7c3aed; }
.cert:nth-child(7n+6) { --c: #16a34a; }
.cert:nth-child(7n)   { --c: #d4a017; }
.cert .cm { flex: 1; min-width: 0; }
.cert .cm h4 { font-family: var(--display); font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.cert .cm span { font-size: 12px; color: var(--ink-3); }
.cert .ct { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); border-radius: 100px; padding: 4px 8px; white-space: nowrap; }
.edu { margin-top: 14px; padding: 20px 22px; border-radius: var(--r); background: var(--accent); color: #fff; }
.edu .ee { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.edu h4 { font-family: var(--display); font-size: 19px; font-weight: 700; margin: 4px 0; letter-spacing: -0.02em; }
.edu span { font-size: 12.5px; opacity: 0.85; }
.edu .yr { font-family: var(--mono); font-size: 12px; opacity: 0.85; margin-top: 6px; display: block; }

/* AWARDS */
.awards { display: grid; gap: 12px; }
.award { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 14px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.award:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.award .ai { font-size: 26px; line-height: 1; }
.award h4 { font-family: var(--display); font-size: 15px; font-weight: 700; line-height: 1.3; }
.award .ao { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-2); display: block; margin: 4px 0 8px; }
.award p { color: var(--ink-2); font-size: 13px; }

/* CONTACT */
.contact { border-radius: var(--r); background: var(--ink); color: var(--paper); padding: clamp(30px, 5vw, 54px); position: relative; overflow: hidden; }
.contact::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 90% 10%, rgba(75,59,255,0.5), transparent 60%), radial-gradient(40% 60% at 5% 95%, rgba(255,90,54,0.4), transparent 60%); pointer-events: none; }
.contact > * { position: relative; z-index: 1; }
.contact h2 { font-family: var(--display); font-size: clamp(28px, 4.5vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 10px 0 16px; }
.contact h2 .accent { color: var(--accent-2); }
.contact p { color: #c8c5bd; max-width: 60ch; margin-bottom: 26px; }
.contact .contact-line { font-size: clamp(13px, 1.5vw, 16px); }
.contact .ee { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.contact .rail-cta { margin-top: 0; }

footer.foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--ink-3); font-size: 12px; }
footer.foot a:hover { color: var(--accent); }

/* =====================================================================
   RESPONSIVE  (mobile-first goal: collapse split → stacked)
   ===================================================================== */

/* medium desktop: keep split but give rail a touch more room */
@media (min-width: 901px) and (max-width: 1180px) {
  :root { --panel-w: 32vw; }
  .portrait { width: clamp(130px, 58%, 180px); }
}

/* tablet & below: rail becomes a normal top section, content flows under */
@media (max-width: 900px) {
  :root { --panel-w: 100%; }
  .rail {
    position: relative; width: 100%; height: auto; min-height: auto;
    align-items: center; text-align: center;
    padding: max(20px, env(safe-area-inset-top, 0px)) clamp(20px, 5vw, 36px) clamp(24px, 5vw, 36px);
  }
  .rail-top { margin-bottom: clamp(14px, 3.5vw, 22px); width: 100%; }
    .portrait { width: clamp(130px, 38vw, 180px); margin: 0 auto; }   /* smaller photo */
  .rail-id { display: flex; flex-direction: column; align-items: center; }
  .rail-id h1 { margin-top: 14px; }
  .rail-cta { justify-content: center; margin-top: 16px; }
  .rail-social { margin-top: 16px; }
  .content { margin-left: 0; padding-top: clamp(40px, 8vw, 64px); }
  .progress { right: auto; left: 0; }
  /* hero block: shorter, content-driven height on mobile */
  .hero-block { min-height: auto; padding-top: clamp(20px, 5vw, 40px); }
}

/* phones: tighten type, stack stats & ctas, full-width buttons */
@media (max-width: 560px) {
  :root { --gut: 18px; }
  .hero-name { font-size: clamp(34px, 11vw, 52px); }
  .hero-meta { gap: 14px 18px; }
  .hero-meta .m b { font-size: 22px; }
  .hero-social { gap: 9px; }
  .hero-social a { width: 44px; height: 44px; }   /* comfy tap targets */
  .rail-cta { flex-direction: column; width: 100%; }
  .rail-cta .btn { justify-content: center; width: 100%; }
  .b-title { font-size: clamp(22px, 6.4vw, 28px); }
  .cert { flex-wrap: wrap; }
  .cert .ct { order: 3; }
  .award { grid-template-columns: 1fr; }
  .award .ai { font-size: 30px; }
  .facts .f { grid-template-columns: 84px 1fr; gap: 10px; }
  .contact .rail-cta { flex-direction: column; }
  footer.foot { flex-direction: column; gap: 8px; }
}
