/* =========================================================
   Supreet Vardhamane — terminal portfolio
   Vanilla CSS. Cyan + green terminal theme. No frameworks.
   ========================================================= */

:root {
  /* surfaces — near-black with a cool tint */
  --bg:         #060910;
  --bg-soft:    #0a0f1a;
  --surface:    #0e1421;
  --surface-2:  #131d2d;
  --border:     #1d2940;
  --border-soft:#162033;

  /* text */
  --text:   #d6e4f5;
  --muted:  #8193ad;

  /* terminal accents */
  --cyan:    #22d3ee;
  --cyan-2:  #7af0ff;
  --green:   #5ef08a;
  --green-2: #34d399;
  --amber:   #fbbf24;
  --magenta: #c792ea;

  /* type */
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1060px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --t: 0.2s ease;
  --ring: 0 0 0 3px rgba(34, 211, 238, 0.45);
  --dock-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* layered background: grid texture (top) → glow pools → base color (bottom) */
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(34,211,238,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.055) 1px, transparent 1px),
    radial-gradient(60% 50% at 82% -8%, rgba(34,211,238,0.16), transparent 60%),
    radial-gradient(55% 45% at -12% 8%, rgba(94,240,138,0.11), transparent 60%);
  background-size: 46px 46px, 46px 46px, auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-2); }
ul { list-style: none; padding: 0; }
strong { color: var(--text); font-weight: 600; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- accessibility ---------- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 0; top: 0; transform: translateY(-110%);
  background: var(--cyan); color: #04141a; font-family: var(--mono); font-weight: 600;
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 200; transition: transform var(--t);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section + .section { border-top: 1px solid var(--border-soft); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-family: var(--mono); }
h3 { font-size: 1.1rem; }

/* terminal command header above each section */
.cmd {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  word-break: break-word;
}
.cmd .usr { color: var(--green); }
.cmd .path { color: var(--cyan); }
.cmd .sym { color: var(--muted); }
.cmd .arg { color: var(--text); }
.section h2 { margin-bottom: 1.75rem; }
.lead { color: var(--muted); max-width: 60ch; }

/* ---------- top header / nav (desktop) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 9, 16, 0.8);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand .prompt { color: var(--green); }
.brand .cur { color: var(--cyan); }

.topnav ul { display: flex; align-items: center; gap: 0.25rem; }
.topnav a {
  font-family: var(--mono); font-size: 0.9rem; color: var(--muted);
  padding: 0.45rem 0.7rem; border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
}
.topnav a:hover { color: var(--text); background: var(--surface); }
.topnav a.is-active { color: var(--cyan); }
.topnav a.is-active::before { content: "> "; color: var(--green); }
.topnav .btn { margin-left: 0.4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-weight: 600; font-size: 0.9rem;
  padding: 0.62rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}
.btn-primary { background: var(--cyan); color: #04141a; }
.btn-primary:hover { color: #04141a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(34,211,238,0.28); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan-2); transform: translateY(-1px); }
/* navbar Resume button → cyan on hover */
.btn-resume:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
.btn-link { color: var(--cyan); padding-inline: 0.3rem; }
.btn-link:hover { color: var(--cyan-2); }

/* ---------- terminal window (hero) ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3rem); }
.terminal {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; } .term-dot.y { background: #febc2e; } .term-dot.g { background: #28c840; }
.term-title { margin-left: 0.6rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.term-body { padding: clamp(1.25rem, 4vw, 2.25rem); }

.line { font-family: var(--mono); color: var(--muted); font-size: 0.9rem; }
.line .usr { color: var(--green); } .line .path { color: var(--cyan); }
.out { color: var(--text); }

#hero-name { font-family: var(--mono); font-size: clamp(2rem, 1.4rem + 3.6vw, 3.4rem); margin: 0.35rem 0 0.15rem; }
.hero-role { font-family: var(--mono); color: var(--cyan); font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem); font-weight: 600; }
.hero-sub { color: var(--muted); margin-top: 0.85rem; max-width: 62ch; }
.hero-sub strong { color: var(--text); }

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem;
  padding: 0.38rem 0.8rem; font-family: var(--mono); font-size: 0.82rem; color: var(--text);
  background: rgba(94,240,138,0.08); border: 1px solid rgba(94,240,138,0.35); border-radius: 999px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(94,240,138,0.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(94,240,138,0.55);} 70%{box-shadow:0 0 0 8px rgba(94,240,138,0);} 100%{box-shadow:0 0 0 0 rgba(94,240,138,0);} }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 1.6rem; }
.prompt-end { font-family: var(--mono); color: var(--muted); margin-top: 1.4rem; }
.cursor { display: inline-block; width: 0.6em; height: 1.05em; vertical-align: text-bottom; background: var(--green); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- current focus ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0.9rem; }
.focus-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-soft); border-left: 2px solid var(--cyan);
  border-radius: var(--radius-sm); padding: 0.95rem 1.1rem;
}
.focus-item .ic { font-size: 1.1rem; line-height: 1.4; }
.focus-item p { font-size: 0.92rem; }
.focus-item .k { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); display: block; margin-bottom: 0.15rem; letter-spacing: 0.03em; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: start; }
.about-text p { color: var(--muted); }
.about-text p + p { margin-top: 1rem; }
.facts { font-family: var(--mono); font-size: 0.88rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.4rem 1.1rem; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; }
.facts li + li { border-top: 1px solid var(--border-soft); }
.facts .k { color: var(--muted); } .facts .k::before { content: "› "; color: var(--cyan); }
.facts .v { color: var(--text); text-align: right; }

/* ---------- stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1rem; text-align: center; }
.stat .n { font-family: var(--mono); font-weight: 700; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); color: var(--cyan); line-height: 1; }
.stat .l { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.skill-group h3 { font-family: var(--mono); font-size: 0.85rem; font-weight: 500; color: var(--green); margin-bottom: 1rem; }
.skill-group h3::before { content: "~/"; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { font-family: var(--mono); font-size: 0.82rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.chips-muted li { color: var(--muted); border-style: dashed; }

/* ---------- projects ---------- */
.featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.featured .f-media { border-right: 1px solid var(--border); }
.featured .f-media img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.featured .f-body { padding: clamp(1.3rem, 3vw, 1.9rem); }
.f-tag { font-family: var(--mono); font-size: 0.72rem; color: var(--green); letter-spacing: 0.05em; }
.featured h3 { font-size: 1.4rem; margin: 0.3rem 0 0.6rem; }
.f-desc { color: var(--muted); margin-bottom: 1rem; }
.f-list { display: grid; gap: 0.75rem; margin-bottom: 1.1rem; }
.f-list dt { font-family: var(--mono); font-size: 0.74rem; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.05em; }
.f-list dd { font-size: 0.92rem; color: var(--text); margin-top: 0.1rem; }
.f-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.f-stack li { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan-2); background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.22); padding: 0.16rem 0.5rem; border-radius: var(--radius-sm); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1.2rem; }
.project-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--t), transform var(--t); }
.project-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.project-media { display: block; border-bottom: 1px solid var(--border); }
.project-media img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; transition: opacity var(--t); }
.project-media:hover img { opacity: 0.9; }
.project-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.project-title { margin-bottom: 0.5rem; }
.project-desc { color: var(--muted); font-size: 0.94rem; margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tags li { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan-2); background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.22); padding: 0.16rem 0.5rem; border-radius: var(--radius-sm); }
.project-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.project-links a { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.85rem; font-weight: 600; }

/* ---------- education / experience ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--cyan); border-radius: var(--radius); padding: 1.5rem 1.7rem; }
.panel + .panel { margin-top: 1rem; }
.edu-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; }
.edu-main h3 { margin-bottom: 0.3rem; }
.edu-degree { color: var(--text); } .edu-meta { color: var(--muted); font-size: 0.9rem; }
.edu-side { text-align: right; margin-left: auto; }
.edu-years { font-family: var(--mono); color: var(--muted); font-size: 0.88rem; }
.edu-cgpa { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--green); }
.edu-cgpa .max { font-size: 0.85rem; color: var(--muted); }
.exp h3 { font-family: var(--mono); color: var(--green-2); margin-bottom: 0.4rem; }
.exp p { color: var(--muted); }

/* ---------- achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.2rem; }
.ach-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.ach-col-title { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cyan); margin-bottom: 1rem; }
.ach-list li { display: flex; gap: 0.8rem; padding: 0.7rem 0; }
.ach-list li + li { border-top: 1px solid var(--border-soft); }
.ach-badge { flex: none; align-self: flex-start; font-family: var(--mono); font-size: 0.66rem; font-weight: 700; color: var(--amber); background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.35); padding: 0.2rem 0.5rem; border-radius: 999px; margin-top: 0.15rem; }
.ach-list-plain li::before { content: "›"; color: var(--cyan); font-family: var(--mono); }
.ach-name { font-weight: 600; font-size: 0.94rem; } .ach-org { color: var(--muted); font-size: 0.84rem; }

/* ---------- contact ---------- */
.contact-cta {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(34,211,238,0.07), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
}
.contact-lead { margin: 0 auto 1.6rem; max-width: 52ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.contact-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.5rem;
  margin-top: 1.6rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft);
}
.contact-links a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.86rem; color: var(--muted);
  transition: color var(--t);
}
.contact-links a:hover { color: var(--cyan-2); }
.contact-links .icon { width: 1.05rem; height: 1.05rem; color: var(--cyan); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: center; text-align: center; padding-block: 2rem; }
.footer-note { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }

/* ---------- mobile bottom app-dock ---------- */
.dock { display: none; }
.dock-nav {
  position: fixed; z-index: 80;
  left: 50%; transform: translateX(-50%);
  bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 1.5rem));
  background: rgba(14, 20, 33, 0.45);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow:
    0 12px 40px -8px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(34, 211, 238, 0.04);
}
.dock-nav ul { display: flex; justify-content: space-around; align-items: center; padding: 0.4rem 0.3rem; }
.dock-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 0.45rem 0.6rem; border-radius: 12px; color: var(--muted);
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.02em;
  transition: color var(--t), background var(--t);
  min-width: 56px;
}
.dock-nav a .icon { width: 1.45rem; height: 1.45rem; }
.dock-nav a:hover { color: var(--text); }
.dock-nav a.is-active { color: var(--cyan); background: rgba(34,211,238,0.1); }

/* ---------- desktop: wrap each section in a readable panel ---------- */
@media (min-width: 761px) {
  main > .section {
    /* opaque enough to read cleanly over the grid — no backdrop-filter,
       so panels don't re-blur the fixed background on every scroll frame */
    background: rgba(9, 13, 22, 0.94);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    margin-block: 1.4rem;
    padding: clamp(2rem, 4vw, 3rem);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 880px) { .featured { grid-template-columns: 1fr; } .featured .f-media { border-right: 0; border-bottom: 1px solid var(--border); } .featured .f-media img { min-height: 200px; max-height: 280px; } }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .edu-side { text-align: left; margin-left: 0; }
  .topnav { display: none; }       /* hide top links on mobile */
  .dock { display: block; }         /* show floating app-dock */
  body {
    padding-bottom: calc(var(--dock-h) + 1.4rem + env(safe-area-inset-bottom, 0px));
    /* mobile browsers handle fixed attachment poorly — use scroll + stronger grid */
    background-attachment: scroll;
    background-image:
      linear-gradient(rgba(34,211,238,0.085) 1px, transparent 1px),
      linear-gradient(90deg, rgba(34,211,238,0.085) 1px, transparent 1px),
      radial-gradient(75% 35% at 85% 0%, rgba(34,211,238,0.18), transparent 60%),
      radial-gradient(70% 30% at -10% 5%, rgba(94,240,138,0.12), transparent 60%);
    background-size: 40px 40px, 40px 40px, auto, auto;
  }
  .site-footer { margin-bottom: 0; }
}

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .cursor { opacity: 1; }
}
