/*
Theme Name: Pranav Vinoth Resume
Author: Pranav Vinoth
Description: Single-page resume theme for RTL design, FPGA and embedded systems work. Skills are shown as an interactive chip pinout.
Version: 2.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: pranav-resume
*/

:root {
  --paper: #eef0f3;
  --paper-2: #e3e6eb;
  --ink: #151826;
  --mute: #585e72;
  --rule: #cdd1da;
  --mask: #4a2c82;
  --mask-ink: #ffffff;
  --gold: #c9a13b;
  --chip: #23262f;
  --chip-mark: #8a8fa0;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17161f;
    --paper-2: #201f2b;
    --ink: #e9e7f0;
    --mute: #a19db2;
    --rule: #33303f;
    --mask: #b49ae8;
    --mask-ink: #17161f;
    --gold: #d9b556;
    --chip: #2d2a3a;
    --chip-mark: #7d7891;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--mask); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.nav-name { font-weight: 800; font-variation-settings: "wdth" 125; text-decoration: none; font-size: 15px; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; color: var(--mute); font-size: 15px; }
.nav ul a:hover { color: var(--ink); }
@media (max-width: 560px) { .nav ul { gap: 16px; } .nav ul li:nth-child(3) { display: none; } }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: start; }
.intro { padding-top: 24px; }
.lede, .seeking { max-width: 36ch; }
.hero h1 {
  font-size: clamp(56px, 8.6vw, 112px);
  line-height: .88;
  font-weight: 850;
  font-variation-settings: "wdth" 125;
  letter-spacing: -.015em;
  margin-bottom: 28px;
}
.lede { font-size: 20px; line-height: 1.5; margin-bottom: 14px; }
.seeking { color: var(--mute); margin-bottom: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 2px;
  text-decoration: none; font-weight: 600; font-size: 15px; background: transparent;
}
.btn:hover { background: var(--paper-2); }
.btn-main { background: var(--mask); border-color: var(--mask); color: var(--mask-ink); }
.btn-main:hover { background: var(--mask); filter: brightness(1.12); }

/* Pinout */
.pinout { width: 560px; }
.pinout-title { font-size: 15px; font-weight: 700; }
.pinout-hint { font-size: 15px; color: var(--mute); margin-bottom: 18px; }
.package { display: grid; grid-template-columns: 1fr 132px 1fr; }
.side { list-style: none; margin: 0; padding: 22px 0; display: flex; flex-direction: column; justify-content: flex-start; }
.side-r { justify-content: center; }
.side li { height: 27px; display: flex; }
.pin-group {
  align-items: flex-end; padding-bottom: 3px;
  font-size: 13px; font-weight: 700; color: var(--mask);
  font-variation-settings: "wdth" 85;
}
.side-l .pin-group { justify-content: flex-end; padding-right: 44px; }
.side-r .pin-group { padding-left: 44px; }
.pin-group:not(:first-child) { margin-top: 20px; }

.pin {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; justify-content: flex-end; width: 100%; height: 100%;
  font-family: var(--font); font-size: 14px; color: var(--ink);
  font-variation-settings: "wdth" 75;
}
.side-r .pin { flex-direction: row-reverse; justify-content: flex-end; }
.pin-label { padding: 1px 6px; border-radius: 2px; white-space: nowrap; }
.pin-num { width: 20px; font-size: 11px; color: var(--mute); text-align: center; font-variant-numeric: tabular-nums; }
.pin-lead { width: 22px; height: 7px; background: var(--gold); }
.side-l .pin-lead { border-radius: 2px 0 0 2px; }
.side-r .pin-lead { border-radius: 0 2px 2px 0; }
.pin:hover .pin-label { background: var(--paper-2); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-label { outline: 2px solid var(--mask); outline-offset: 1px; }
.pin[aria-pressed="true"] .pin-label { background: var(--mask); color: var(--mask-ink); }
.pin[aria-pressed="true"] .pin-lead { background: var(--mask); }

.body {
  position: relative; background: var(--chip); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  writing-mode: vertical-rl;
}
.body::before { /* orientation notch */
  content: ""; position: absolute; top: -1px; left: 50%; width: 30px; height: 15px; margin-left: -15px;
  background: var(--paper); border-radius: 0 0 15px 15px;
}
.body::after { /* pin 1 dot */
  content: ""; position: absolute; top: 26px; left: 14px; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--chip-mark);
}
.mark { color: var(--chip-mark); font-weight: 800; font-size: 26px; letter-spacing: .06em; font-variation-settings: "wdth" 125; }
.mark-sub { font-size: 12px; font-weight: 600; letter-spacing: .14em; font-variation-settings: "wdth" 100; }

.readout {
  margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--mask); background: var(--paper-2);
  display: flex; gap: 12px; align-items: baseline; justify-content: space-between; min-height: 48px;
}
.readout-text { font-size: 15px; }
.readout-text a { color: var(--mask); font-weight: 600; }
.readout-clear { all: unset; cursor: pointer; font-size: 14px; color: var(--mute); text-decoration: underline; white-space: nowrap; }
.readout-clear[hidden] { display: none; }

/* One orchestrated moment: pins power up in pin order on first load */
.js .pin-lead { animation: power .35s ease-out both; animation-delay: calc(var(--i, 0) * 28ms + 200ms); }
@keyframes power { from { background: var(--rule); } to { background: var(--gold); } }
@media (prefers-reduced-motion: reduce) { .js .pin-lead { animation: none; } }

/* Award strip */
.award { background: var(--ink); color: var(--paper); }
.award-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.award-big { font-size: clamp(34px, 4.6vw, 54px); font-weight: 850; line-height: 1; color: var(--gold); font-variation-settings: "wdth" 125; white-space: nowrap; }
.award-text { max-width: 68ch; font-size: 16px; }

/* Sections */
.band { padding: 88px 0 24px; }
.band-title {
  font-size: clamp(36px, 5vw, 60px); font-weight: 850; line-height: 1;
  font-variation-settings: "wdth" 125; letter-spacing: -.01em; margin-bottom: 40px;
}

.proj {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px;
  padding: 36px 0; border-top: 1.5px solid var(--ink);
  transition: opacity .25s ease;
}
.proj h3 { font-size: 22px; line-height: 1.2; font-weight: 750; font-variation-settings: "wdth" 110; margin-bottom: 10px; }
.when { color: var(--mute); font-size: 15px; }
.board { font-size: 15px; font-weight: 600; }
.proj-body { max-width: 68ch; }
.figure-line { font-size: 17px; margin-bottom: 12px; color: var(--mute); }
.figure-line strong { font-size: 30px; color: var(--ink); font-weight: 850; font-variation-settings: "wdth" 125; margin-right: 8px; }
.points { margin: 0 0 18px; padding-left: 18px; }
.points li { margin: 7px 0; }
.points li::marker { color: var(--gold); }

.diagram { margin: 0 0 20px; padding: 18px; background: var(--paper-2); border-radius: 3px; color: var(--ink); }
.diagram svg { display: block; width: 100%; height: auto; }
.dg-box rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dg-video rect { stroke: var(--mask); }
.dg-txt text { font-family: var(--font); font-size: 14px; font-weight: 650; text-anchor: middle; fill: var(--ink); }
.dg-txt .dg-note { font-size: 12px; font-weight: 500; fill: var(--mute); text-anchor: middle; }
.dg-line path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.dg-line .dg-bus { stroke: var(--mask); stroke-dasharray: 4 3; }

.uses { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.uses-label { font-size: 14px; color: var(--mute); margin-right: 4px; }
.tag {
  all: unset; cursor: pointer; font-family: var(--font); font-size: 13px; padding: 3px 9px;
  border: 1px solid var(--rule); border-radius: 2px; font-variation-settings: "wdth" 80;
}
.tag:hover { border-color: var(--ink); }
.tag:focus-visible { outline: 2px solid var(--mask); outline-offset: 2px; }
.tag[aria-pressed="true"] { background: var(--mask); border-color: var(--mask); color: var(--mask-ink); }

/* Selection state */
.has-sel [data-uses] { transition: opacity .25s ease; }
.has-sel [data-uses]:not(.is-hit) { opacity: .3; }
.proj.is-hit { box-shadow: inset 4px 0 0 var(--mask); padding-left: 20px; }
.job.is-hit h3 { color: var(--mask); }
.award-text.is-hit { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .has-sel [data-uses], .proj { transition: none; } }

/* Experience: a trace with vias, in time order */
.trace { list-style: none; margin: 0; padding: 0 0 0 34px; border-left: 2px solid var(--gold); max-width: 76ch; }
.job { position: relative; padding: 0 0 40px; }
.job::before {
  content: ""; position: absolute; left: -44px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--gold);
}
.job h3 { font-size: 20px; font-weight: 750; font-variation-settings: "wdth" 110; margin: 2px 0 2px; }
.org { color: var(--mute); margin-bottom: 8px; }

.edu h3 { font-size: 20px; font-weight: 750; font-variation-settings: "wdth" 110; margin-bottom: 4px; }
.courses { max-width: 70ch; }

/* Contact */
.contact { margin-top: 72px; padding: 80px 0 48px; border-top: 1.5px solid var(--ink); }
.contact-title { font-size: clamp(30px, 4vw, 44px); font-weight: 850; font-variation-settings: "wdth" 125; margin-bottom: 10px; }
.contact-mail {
  display: inline-block; font-size: clamp(22px, 3.4vw, 38px); font-weight: 500; color: var(--mask);
  text-decoration-thickness: 2px; text-underline-offset: 6px; margin-bottom: 28px; word-break: break-all;
}
.fine { margin-top: 48px; font-size: 14px; color: var(--mute); }

/* Responsive */
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .intro { padding-top: 0; }
  .pinout { width: 100%; max-width: 560px; }
}
@media (max-width: 760px) {
  .proj { grid-template-columns: 1fr; gap: 16px; }
  .award-in { grid-template-columns: 1fr; gap: 12px; }
  .band { padding-top: 64px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .package { grid-template-columns: 1fr 46px 1fr; }
  .mark { font-size: 15px; }
  .mark-sub { display: none; }
  .body::after { left: 8px; width: 7px; height: 7px; }
  .pin { font-size: 12px; }
  .pin-label { padding: 1px 3px; }
  .pin-num { display: none; }
  .pin-lead { width: 12px; }
  .side-l .pin-group { padding-right: 18px; }
  .side-r .pin-group { padding-left: 18px; }
  .pin-group { font-size: 12px; }
  .readout { flex-direction: column; gap: 6px; }
}

/* PCB power-path diagram */
.dg-stage { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.dg-cell rect { fill: var(--gold); }
.dg-line rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dg-diode { fill: var(--ink); }
.dg-loop { fill: none; stroke: var(--mask); stroke-width: 1.75; stroke-dasharray: 5 4; }
.dg-txt .dg-sm { font-size: 11px; }
.dg-txt .dg-strong { font-size: 15px; font-weight: 800; }
.dg-txt .dg-loopnote { font-size: 12px; font-weight: 600; fill: var(--mask); }
.dg-side text { font-family: var(--font); font-size: 13px; fill: var(--mute); }
