/* Rohan Reddy Jakkam — portfolio. Hand-written CSS, no framework. */
:root {
  --bg: #0a0a0c; --bg-2: #0f0f12; --surface: #131317; --surface-2: #1a1a20;
  --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f2ee; --text-2: #a9a9b3; --text-3: #70707b;
  --accent: #f2b544; --accent-2: #ff8a5b; --accent-ink: #1a1206; --cool: #7aa2ff; --good: #5ad28a;
  --glow: rgba(242, 181, 68, 0.16);
  --radius: 20px; --radius-sm: 12px;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1180px; --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f6f2; --bg-2: #f0eee8; --surface: #ffffff; --surface-2: #f3f1eb;
  --border: rgba(18, 18, 22, 0.09); --border-strong: rgba(18, 18, 22, 0.18);
  --text: #121216; --text-2: #585864; --text-3: #8a8a95;
  --accent: #b4731a; --accent-2: #c9542c; --accent-ink: #fff8ea; --cool: #3558c9; --good: #1f9d5a;
  --glow: rgba(180, 115, 26, 0.14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.h2 {
  font-family: var(--font-display); font-size: clamp(38px, 5.2vw, 64px); line-height: 1.02;
  letter-spacing: -0.01em; margin-top: 18px; max-width: 14ch; text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--accent); }
.lede { color: var(--text-2); font-size: clamp(17px, 1.5vw, 19px); max-width: 60ch; margin-top: 20px; text-wrap: pretty; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: clamp(40px, 6vw, 64px); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 48px; }
  .section-head .lede { margin-top: 0; justify-self: end; }
}

/* grain + ambient */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain { opacity: 0.045; mix-blend-mode: multiply; }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: -0.01em; }
.brand .mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: linear-gradient(145deg, var(--surface-2), var(--surface));
  font-family: var(--font-display); font-size: 19px; letter-spacing: -0.02em; color: var(--accent);
}
.brand .name { display: none; }
@media (min-width: 560px) { .brand .name { display: inline; } }
.nav-links { display: none; gap: 4px; }
@media (min-width: 760px) { .nav-links { display: flex; } }
.nav-links a { padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-size: 14px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-2); transition: border-color 0.2s, color 0.2s, transform 0.2s; }
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
#sun { display: none; } #moon { display: block; }
:root[data-theme="light"] #sun { display: block; } :root[data-theme="light"] #moon { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.005em; border: 1px solid var(--border-strong);
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.35s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); border-color: var(--text-3); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 30px -12px var(--glow); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px var(--glow); border-color: transparent; }
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg.arrow { transform: translate(2px, -2px); }
.btn:hover svg.down { transform: translateY(3px); }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 48px) 0 72px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 20%, transparent 75%);
}
.hero-glow { position: absolute; inset: 0; background: radial-gradient(720px circle at var(--mx, 60%) var(--my, 30%), var(--glow), transparent 62%); transition: background 0.2s; }
.hero-orb { position: absolute; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; right: -18vw; top: -22vw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(122, 162, 255, 0.18), transparent 60%); filter: blur(30px); }
.hero .container { position: relative; z-index: 2; }
.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); padding: 8px 14px 8px 10px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(46px, 8.4vw, 112px); line-height: 0.98; letter-spacing: -0.015em;
  margin-top: 28px; max-width: 12ch; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { font-size: clamp(17px, 1.7vw, 21px); max-width: 58ch; margin-top: 26px; }
.hero .lede strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; align-items: center; }
.hero-links { display: flex; gap: 6px; margin-left: 4px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 28px; margin-top: clamp(48px, 7vw, 84px); padding-top: 32px; border-top: 1px solid var(--border); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; }
.stat .num { font-family: var(--font-mono); font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.03em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .num sup { font-size: 0.45em; color: var(--accent); margin-left: 2px; }
.stat .label { color: var(--text-3); font-size: 13px; margin-top: 10px; letter-spacing: 0.01em; }

/* hero portrait */
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); gap: 56px; } }
.hero-portrait { margin: 0; position: relative; width: 112px; aspect-ratio: 1; order: -1; }
@media (min-width: 960px) { .hero-portrait { order: 0; width: min(100%, 440px); justify-self: end; } }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 22px; border: 1px solid var(--border-strong); box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.8); background: var(--surface-2); }
@media (min-width: 960px) { .hero-portrait img { border-radius: 30px; } }
.hero-portrait::before { content: ""; position: absolute; inset: -10%; border-radius: 40px; background: conic-gradient(from 210deg, transparent 0%, var(--glow) 25%, transparent 55%, var(--cool) 75%, transparent 100%); opacity: 0.55; filter: blur(26px); z-index: -1; }
.hero-portrait figcaption { display: none; position: absolute; left: 16px; bottom: 16px; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
@media (min-width: 960px) { .hero-portrait figcaption { display: inline-flex; } }
.hero-portrait figcaption .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
:root[data-theme="light"] .hero-portrait img { box-shadow: 0 30px 70px -30px rgba(20, 20, 30, 0.35); }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: "◆"; font-size: 8px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* work */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card {
  position: relative; grid-column: span 12; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px); overflow: hidden; display: flex; flex-direction: column; gap: 18px; min-height: 100%;
  transition: transform 0.6s var(--ease), border-color 0.3s, box-shadow 0.6s var(--ease);
  --x: 50%; --y: 50%;
}
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--x) var(--y), var(--glow), transparent 55%); opacity: 0; transition: opacity 0.4s; }
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card .stretched::after { content: ""; position: absolute; inset: 0; z-index: 3; }
@media (min-width: 760px) { .card.span-7 { grid-column: span 7; } .card.span-5 { grid-column: span 5; } .card.span-6 { grid-column: span 6; } .card.span-4 { grid-column: span 4; } }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.lang { font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; }
.lang i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; }
.card h3 { font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 36px); letter-spacing: -0.01em; line-height: 1.05; display: flex; align-items: baseline; gap: 10px; }
.card h3 .arrow { width: 18px; height: 18px; color: var(--text-3); transition: transform 0.35s var(--ease), color 0.3s; align-self: center; }
.card:hover h3 .arrow { transform: translate(3px, -3px); color: var(--accent); }
.card p { color: var(--text-2); font-size: 15px; max-width: 56ch; text-wrap: pretty; }
.metric { display: flex; align-items: baseline; gap: 12px; margin-top: auto; }
.metric .big { font-family: var(--font-mono); font-size: clamp(34px, 3.4vw, 46px); letter-spacing: -0.04em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.metric .big small { font-size: 0.5em; color: var(--accent); letter-spacing: 0; }
.metric .cap { color: var(--text-3); font-size: 13px; max-width: 26ch; line-height: 1.35; }
.viz { width: 100%; height: auto; color: var(--text-3); }
.viz .accent { color: var(--accent); } .viz .cool { color: var(--cool); } .viz .good { color: var(--good); }
.viz text { font-family: var(--font-mono); font-size: 10px; fill: var(--text-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); padding: 4px 9px; border-radius: 999px; background: var(--surface-2); }
.more { margin-top: 28px; display: flex; justify-content: center; }

/* experience */
.timeline { display: grid; gap: 0; border-top: 1px solid var(--border); }
.job { display: grid; grid-template-columns: 1fr; gap: 10px 48px; padding: 34px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 820px) { .job { grid-template-columns: 300px 1fr; } }
.job .when { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.job .who { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.01em; line-height: 1.1; margin-top: 6px; }
.job .role { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.job ul { display: grid; gap: 10px; }
.job li { color: var(--text-2); font-size: 15px; padding-left: 22px; position: relative; text-wrap: pretty; }
.job li::before { content: ""; position: absolute; left: 0; top: 11px; width: 10px; height: 1px; background: var(--accent); }
.job li strong { color: var(--text); font-weight: 500; }

/* principles */
.principles { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principle { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; }
.principle .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.principle h3 { font-family: var(--font-display); font-size: 28px; line-height: 1.08; }
.principle p { color: var(--text-2); font-size: 15px; }

/* beyond */
.beyond { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .beyond { grid-template-columns: repeat(3, 1fr); } }
.beyond .card h3 { font-size: 30px; }

/* skills */
.skills { display: grid; gap: 22px; }
.skill-row { display: grid; grid-template-columns: 1fr; gap: 12px 40px; padding: 22px 0; border-top: 1px solid var(--border); }
@media (min-width: 760px) { .skill-row { grid-template-columns: 220px 1fr; } }
.skill-row:last-child { border-bottom: 1px solid var(--border); }
.skill-row .k { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); padding-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; color: var(--text-2); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.2s, color 0.2s; }
.chips span:hover { border-color: var(--border-strong); color: var(--text); }

/* contact */
.contact { text-align: center; padding: clamp(90px, 14vw, 170px) 0; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: auto 0 -40%; height: 90%; background: radial-gradient(ellipse 50% 60% at 50% 100%, var(--glow), transparent 70%); pointer-events: none; }
.contact .h2 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.contact .lede { margin: 20px auto 0; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 40px; position: relative; }
.email-line { margin-top: 26px; font-family: var(--font-mono); font-size: 14px; color: var(--text-3); }
.email-line button { color: var(--text-2); border-bottom: 1px dashed var(--text-3); padding: 0 0 2px; transition: color 0.2s; }
.email-line button:hover { color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--text-3); font-size: 13px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer a { color: var(--text-2); } .footer a:hover { color: var(--text); }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; } .status .dot { animation: none; }
  .card, .btn { transition: none; }
}
