/* =========================================================
   Preetam Goudar — polished console portfolio
   ========================================================= */
:root, [data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #050505;
  --surface: #0a0a0b;
  --surface-2: #121214;
  --border: #262629;
  --border-soft: #1b1b1e;
  --text: #e9eef6;
  --muted: #9aa7ba;
  --faint: #6d7b90;
  --accent: #4fd1a5;
  --accent-strong: #38b98f;
  --accent-soft: rgba(79, 209, 165, .12);
  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
  --code-bg: #050506;
  --dot: rgba(255, 255, 255, .10);
  --glow-a: rgba(45, 212, 191, .10);
  --glow-b: rgba(99, 102, 241, .09);
  --glow-c: rgba(217, 70, 239, .07);
  --orb-blend: screen;
  --grad: linear-gradient(95deg, #4fd1a5 0%, #5b9cff 52%, #c084fc 100%);
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; background: var(--bg); transition: background .25s ease; }
body {
  margin: 0; background: transparent; color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.035em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.container { width: min(100% - 48px, var(--max)); margin-inline: auto; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.accent { color: var(--accent); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------------- ambient background ---------------- */
.bg-effects { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-3d { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: .95; }
.bg-effects .glow {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(80px); mix-blend-mode: var(--orb-blend);
  will-change: transform; animation: drift 24s ease-in-out infinite;
}
.glow-1 {
  width: 42vw; height: 42vw; top: -12vw; left: -8vw;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 68%);
}
.glow-2 {
  width: 38vw; height: 38vw; top: 12%; right: -11vw;
  background: radial-gradient(circle, var(--glow-b) 0%, transparent 68%);
  animation-delay: -7s; animation-duration: 30s;
}
.glow-3 {
  width: 40vw; height: 40vw; bottom: -15vw; left: 10%;
  background: radial-gradient(circle, var(--glow-c) 0%, transparent 68%);
  animation-delay: -13s; animation-duration: 34s;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 50%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 50%, transparent 92%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, -3vw, 0) scale(1.14); }
}
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: baseline; gap: 5px; font-size: .9rem; }
.brand-mark { font-size: 1.3rem; font-weight: 700; letter-spacing: -.06em; }
.brand-slash { color: var(--accent); }
.brand-sub { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: .78rem; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--muted); font-size: .86rem; font-weight: 500; transition: color .18s ease; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { position: relative; }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--accent); border-radius: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---------------- hero ---------------- */
.hero { padding: 92px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.availability {
  display: inline-flex; align-items: center; gap: 9px; color: var(--muted);
  font-size: .78rem; font-family: "JetBrains Mono", monospace;
  border: 1px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 100px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(79,209,165,0); } }
h1 { font-size: clamp(2.8rem, 5.6vw, 4.35rem); line-height: 1.05; margin: 26px 0 18px; font-weight: 700; }
.greeting {
  display: block; margin-bottom: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(.95rem, 1.9vw, 1.15rem); font-weight: 500; letter-spacing: .02em;
  line-height: 1.3;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero-tagline { color: var(--muted); font-size: 1.08rem; max-width: 560px; line-height: 1.75; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.hero-highlights span {
  font-size: .76rem; color: var(--muted); padding: 6px 11px;
  border: 1px solid var(--border-soft); border-radius: 6px; background: var(--surface);
}
.hero-highlights span:nth-child(1) { color: #2bb98f; border-color: rgba(43, 185, 143, .4); }
.hero-highlights span:nth-child(2) { color: #4a86f7; border-color: rgba(74, 134, 247, .4); }
.hero-highlights span:nth-child(3) { color: #a06bea; border-color: rgba(160, 107, 234, .4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 8px; font-size: .87rem; font-weight: 600;
  border: 1px solid transparent; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #062017; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 26px var(--accent-soft); }
.btn-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); }
.social-row { display: flex; gap: 24px; margin-top: 36px; }
.social-row a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; transition: color .18s; }
.social-row a:hover { color: var(--text); }
.social-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* hero visual */
.hero-visual { position: relative; }

/* console */
.console {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--code-bg); box-shadow: var(--shadow);
}
.console-bar {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: .73rem; color: var(--muted);
}
.console-dots { display: inline-flex; gap: 6px; }
.console-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.console-dots i:first-child { background: var(--accent); opacity: .7; }
.console-title {
  font-family: "JetBrains Mono", monospace;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.console-hint { margin-left: auto; font-size: .68rem; color: var(--faint); }
.console-hint code { font-family: "JetBrains Mono", monospace; color: var(--accent); }
.console-output {
  height: 214px; overflow-y: auto; padding: 18px 18px 8px;
  font-family: "JetBrains Mono", monospace; font-size: .75rem; line-height: 1.9;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.console-output::-webkit-scrollbar { width: 6px; }
.console-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.line { word-break: break-word; color: var(--text); }
.line.muted { color: var(--muted); }
.prompt { color: var(--accent); font-family: "JetBrains Mono", monospace; }
.console-input {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-top: 1px solid var(--border); background: var(--surface);
  font-family: "JetBrains Mono", monospace; font-size: .75rem;
}
.console-input input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  color: var(--text); caret-color: var(--accent); font-size: .75rem;
}
.console-input input::placeholder { color: var(--faint); }
.console-input button { background: none; border: 0; color: var(--muted); font-size: 1rem; line-height: 1; }
.console-input button:hover { color: var(--accent); }
.console-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 16px; background: var(--surface); }
.console-quick button {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 5px; padding: 4px 9px; font-family: "JetBrains Mono", monospace; font-size: .67rem;
  transition: color .18s, border-color .18s;
}
.console-quick button:hover { color: var(--accent); border-color: var(--accent); }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 82px; background: var(--border-soft); border: 1px solid var(--border-soft);
  border-radius: 12px; overflow: hidden;
}
.stat { background: var(--surface); padding: 22px 24px; }
.stat-label { display: block; font-family: "JetBrains Mono", monospace; font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 8px; }
.stat strong {
  display: block; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1.2;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.stat > span:last-child { display: block; color: var(--muted); font-size: .75rem; margin-top: 5px; }

/* ---------------- sections ---------------- */
.section { padding: 108px 0; }
.section-alt { background: var(--bg-soft); background: color-mix(in srgb, var(--bg-soft) 88%, transparent); border-block: 1px solid var(--border-soft); }
.section-head { margin-bottom: 38px; max-width: 760px; }
.eyebrow {
  display: block; font-size: .74rem; letter-spacing: .06em; margin-bottom: 14px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.2; }
.section-sub { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

/* about */
.about-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 24px; align-items: start; }
.prose { padding: 34px 36px; }
.prose p { color: var(--muted); font-size: .94rem; margin-bottom: 16px; }
.prose p:last-of-type { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pill-row span {
  font-size: .72rem; color: var(--accent); padding: 5px 11px;
  border-radius: 6px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.pill-row span:nth-child(4n+2) { color: #4a86f7; border-color: rgba(74,134,247,.28); background: rgba(74,134,247,.09); }
.pill-row span:nth-child(4n+3) { color: #a06bea; border-color: rgba(160,107,234,.28); background: rgba(160,107,234,.09); }
.pill-row span:nth-child(4n+4) { color: #d98b3a; border-color: rgba(217,139,58,.28); background: rgba(217,139,58,.09); }
.fact-card { padding: 30px 28px; }
.fact-card h3 { font-size: 1rem; margin-bottom: 18px; }
.fact-card dl { margin: 0; }
.fact-card dl > div { padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.fact-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-card dt { font-family: "JetBrains Mono", monospace; font-size: .67rem; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.fact-card dd { margin: 3px 0 0; font-size: .84rem; color: var(--text); }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card { padding: 28px 30px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.skill-index { color: var(--faint); font-size: .7rem; }
.skill-card:nth-child(1) .skill-index { color: #2bb98f; }
.skill-card:nth-child(2) .skill-index { color: #4a86f7; }
.skill-card:nth-child(3) .skill-index { color: #a06bea; }
.skill-card:nth-child(4) .skill-index { color: #d98b3a; }
.skill-card:nth-child(5) .skill-index { color: #d467a6; }
.skill-card h3 { font-size: 1.08rem; margin: 10px 0 6px; }
.skill-card p { color: var(--muted); font-size: .82rem; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: .72rem; color: var(--muted); padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2);
}
.chips span:hover { color: var(--accent); border-color: var(--accent); }

/* timeline */
.timeline { display: grid; gap: 20px; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; }
.timeline-date { font-family: "JetBrains Mono", monospace; font-size: .74rem; color: var(--accent); padding-top: 24px; }
.timeline-card { padding: 24px 28px; transition: border-color .2s, transform .2s; }
.timeline-card:hover { border-color: var(--accent); transform: translateX(3px); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.timeline-head h3 { font-size: 1.05rem; }
.tag { font-size: .66rem; font-family: "JetBrains Mono", monospace; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; }
.tag-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.org { color: var(--accent); font-size: .76rem; margin: 6px 0 10px; }
.timeline-card > p:last-child { color: var(--muted); font-size: .86rem; max-width: 760px; }

/* education */
.education-card { padding: 34px 36px; max-width: 820px; }
.edu-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.edu-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: .9rem; }
.edu-period { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--accent); }
.education-card h3 { font-size: 1.3rem; }
.edu-institute { color: var(--text); font-weight: 500; font-size: .95rem; margin: 8px 0 4px; }
.edu-note { color: var(--muted); font-size: .87rem; }
.edu-note strong { color: var(--text); font-weight: 600; }

/* projects */
.project-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.project-card { display: flex; flex-direction: column; padding: 30px 32px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-card.featured { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-label { font-family: "JetBrains Mono", monospace; font-size: .68rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.project-arrow { color: var(--faint); }
.project-card h3 { font-size: 1.5rem; margin: 16px 0 10px; }
.project-card > p { color: var(--muted); font-size: .87rem; margin-bottom: 18px; }
.project-card .chips { margin-bottom: 24px; }
.text-link { margin-top: auto; color: var(--accent); font-size: .82rem; font-weight: 600; }
.text-link span { display: inline-block; transition: transform .18s; }
.text-link:hover span { transform: translateX(4px); }

/* contact */
.contact-section { padding-bottom: 110px; }
.contact-card { padding: 60px 40px; text-align: center; border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.contact-card h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 14px; }
.contact-card > p { color: var(--muted); max-width: 580px; margin: 0 auto 28px; font-size: .9rem; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* footer */
.site-footer { border-top: 1px solid var(--border-soft); padding: 26px 0; background: var(--bg-soft); }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }
.footer { color: var(--faint); font-size: .7rem; }
.footer-wrap a { color: var(--text); }
.footer-wrap a:hover { color: var(--accent); }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 680px; }
  .console { max-width: 680px; }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 88px; }
  .container { width: min(100% - 32px, var(--max)); }
  .nav-wrap { height: 62px; }
  .nav {
    position: absolute; top: 62px; left: 0; right: 0; display: flex; flex-direction: column;
    align-items: stretch; gap: 0; padding: 8px 16px 14px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .22s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 11px 2px; border-bottom: 1px solid var(--border-soft); }
  .nav a.active::after { display: none; }
  .menu-toggle { display: block; }
  .hero { padding-top: 56px; }
  h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .hero-tagline { font-size: .98rem; }
  .section { padding: 78px 0; }
  .skill-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-date { padding-top: 0; }
  .prose, .education-card, .project-card { padding: 26px 22px; }
  .contact-card { padding: 46px 22px; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 18px 20px; }
  .console-output { height: 190px; }
  .social-row { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bg-effects .glow { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
