/* ============================================================
   SIDDESH PATIL — PORTFOLIO STYLES
   styles.css
   ============================================================ */

/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS VARIABLES ── */
:root {
  --bg: #0d0d0c;         /* darkest background */
  --bg2: #111110;        /* slightly lighter bg, used for alt sections */
  --bg3: #161615;        /* card hover background */
  --border: #222220;     /* section dividers and hairlines */
  --border2: #2e2e2b;    /* tag borders and subtle lines */
  --text: #e2ddd4;       /* primary text color */
  --muted: #5a5a55;      /* secondary / label text */
  --dim: #aaa9a0;        /* increased from #888880 for better readability */
  --green: #3ddc84;      /* accent — status dot, hover states, arrows */
  --mono: 'Geist Mono', monospace;
  --sans: 'Geist', sans-serif;
}

/* ── HTML & BODY ── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── SUBTLE FILM GRAIN OVERLAY ── 
   SVG fractal noise rendered as a fixed overlay.
   Adds texture without being distracting.            */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: .4;
}


/* ============================================================
   LOADER
   ============================================================ */

/* Full-screen loader container. Sits above everything. */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg);
  overflow: hidden;
}

/* Canvas fills the loader for the CV-detection box animation */
#lc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Percentage counter at the bottom center */
.l-pct {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: #444;
  letter-spacing: .16em;
  z-index: 2;
}


/* ============================================================
   MAIN WRAPPER
   Starts invisible, fades in when loader completes
   ============================================================ */
#main {
  opacity: 0;
  transition: opacity .7s ease;
}

#main.visible {
  opacity: 1;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}

/* Scrolled state — frosted glass effect */
nav.scrolled {
  border-color: var(--border);
  background: rgba(13, 13, 12, .92);
  backdrop-filter: blur(12px);
}

/* Logo / identity mark */
.nav-id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .08em;
  text-decoration: none;
  transition: color .2s;
}
.nav-id:hover { color: var(--text); }

/* Nav link list */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }


/* ============================================================
   HERO SECTION
   ============================================================ */

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 56px 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Very faint dot grid — masked so it fades toward edges */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}


/* ── DIGITAL FLIP NAME ──
   Each character is a .cn "slot" containing .cn-out (visible)
   and .cn-in (incoming). When .flipping is added, flipOut/flipIn
   animations fire to simulate a split-flap board.               */

.hero-name-wrap {
  margin-bottom: 40px;
  overflow: hidden;
}

.hero-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  letter-spacing: -.035em;
  line-height: .95;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
}

/* Individual character slot */
.cn {
  display: inline-block;
  position: relative;
  perspective: 400px;
}

/* Trigger the flip by adding .flipping to the .cn element */
.cn.flipping .cn-out {
  animation: flipOut .18s ease-in forwards;
}
.cn.flipping .cn-in {
  animation: flipIn .18s ease-out .15s forwards;
  opacity: 0;
}

/* Character rotating away */
@keyframes flipOut {
  0%   { transform: rotateX(0deg);   opacity: 1; }
  100% { transform: rotateX(-90deg); opacity: 0; }
}

/* New character rotating in */
@keyframes flipIn {
  0%   { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg);  opacity: 1; }
}

/* Both char layers share this base */
.cn-out,
.cn-in {
  display: inline-block;
  transform-origin: 50% 100%;
}

/* Incoming char is absolutely positioned over the outgoing */
.cn-in {
  position: absolute;
  left: 0;
  top: 0;
}

/* Space character — invisible width spacer */
.cn-space {
  display: inline-block;
  width: .3em;
}


/* ── HERO BODY TEXT ── */
.hero-desc {
  font-size: clamp(1.05rem, 1.4vw, 1.15rem); /* slightly larger than before */
  color: var(--dim);                           /* --dim raised to #aaa9a0 */
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 48px;
}
.hero-desc strong {
  color: var(--text);
  font-weight: 400;
}


/* ── AVAILABILITY STATUS ── */
.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
}

/* Pulsing green dot */
.sdot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: dp 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--green);
}
@keyframes dp {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

/* Scroll nudge at bottom-left of hero */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 56px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .14em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.scroll-hint::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--border2);
}


/* ============================================================
   GENERIC SECTION BASE
   ============================================================ */

.section {
  padding: 96px 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Alternating section background */
.section.alt {
  background: var(--bg2);
}

/* Section label — small mono text above content */
.sec-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .14em;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Short line after the label text */
.sec-label::after {
  content: '';
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: var(--border2);
}


/* ============================================================
   PROJECTS SECTION
   ============================================================ */

/* CSS grid with 1px gap — gap acts as a border between cards */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border); /* gap color */
}

/* Individual project card */
.proj-card {
  background: var(--bg2);
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
.proj-card:hover { background: var(--bg3); }

/* Accent line appears at top of card on hover */
.proj-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: transparent;
  transition: background .35s;
}
.proj-card:hover::after { background: var(--green); }

/* Alt card background (on main dark bg) */
.proj-card.alt { background: var(--bg); }
.proj-card.alt:hover { background: var(--bg2); }

/* Wide card spans both columns */
.proj-card.wide { grid-column: 1 / -1; }

/* Wide card uses a two-col internal grid */
.proj-card.wide .wide-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* Project index number */
.proj-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .12em;
  margin-bottom: 18px;
}

/* "In progress" badge */
.proj-wip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  padding: 2px 8px;
  border: 1px solid rgba(255, 183, 0, .2);
  color: #ffb700;
  margin-bottom: 14px;
}

.proj-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 6px;
}

.proj-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  margin-bottom: 16px;
}

/* Project description — uses --dim (raised brightness) */
.proj-desc {
  font-size: 15px; /* increased from 14px */
  color: var(--dim);
  line-height: 1.75;
  margin-bottom: 22px;
}

/* Tech stack tags */
.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.stag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  padding: 3px 8px;
  border: 1px solid var(--border2);
  color: var(--muted);
}

/* GitHub link */
.proj-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.proj-link:hover {
  color: var(--green);
  border-color: var(--green);
}

/* Feature bullet list inside wide card */
.proj-feats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.proj-feats li {
  font-size: 15px; /* increased */
  color: var(--dim);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}
/* Arrow bullet */
.proj-feats li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
}


/* ============================================================
   SKILLS SECTION
   ============================================================ */

.skills-table {
  max-width: 820px;
}

.skill-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  gap: 24px;
}
.skill-row:first-child { border-top: 1px solid var(--border); }

.skill-cat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
}

/* Skill values — full text, uses primary --text */
.skill-vals {
  font-size: 16px; /* increased from 15px */
  color: var(--text);
}


/* ============================================================
   CERTIFICATIONS SECTION
   ============================================================ */

.certs-wrap { max-width: 720px; }

.cert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  transition: padding-left .25s;
}
.cert-item:first-child { border-top: 1px solid var(--border); }
.cert-item:hover { padding-left: 8px; }

.cert-name-t {
  font-size: 16px; /* increased */
  color: var(--text);
  margin-bottom: 3px;
}

.cert-from {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.cert-yr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}


/* ============================================================
   GITHUB SECTION
   ============================================================ */

/* Label above the graph */
.gh-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 16px;
}

/* Graph container */
.gh-graph {
  border: 1px solid var(--border);
  overflow: hidden;
}

.gh-graph img {
  width: 100%;
  height: auto;
  display: block;
  /* desaturated by default, pops to green on hover */
  filter: brightness(.65) saturate(1.3);
  transition: filter .3s;
}
.gh-graph img:hover {
  filter: brightness(1) saturate(1.6);
}


/* ============================================================
   EDUCATION SECTION
   ============================================================ */

.edu-block {
  max-width: 700px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.edu-degree {
  font-size: 17px; /* increased */
  color: var(--text);
  margin-bottom: 5px;
}

.edu-school {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 14px;
}

.edu-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edu-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 9px;
  border: 1px solid var(--border2);
  color: var(--muted);
  letter-spacing: .06em;
}


/* ============================================================
   CONTACT SECTION
   ============================================================ */

#contact {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: none;
}

/* Large heading */
.contact-head {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  letter-spacing: -.03em;
  line-height: .95;
  color: var(--text);
  margin-bottom: 16px;
}

/* Sarcastic sub-line under the heading */
.contact-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: 48px;
}

.contact-head span { color: var(--green); }

/* Link rows */
.contact-links {
  display: flex;
  flex-direction: column;
  max-width: 460px;
}

.c-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: padding-left .25s;
}
.c-link:last-child { border-bottom: 1px solid var(--border); }
.c-link:hover { padding-left: 10px; }
.c-link:hover .c-arr { color: var(--green); }

.c-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
}

.c-handle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.c-arr {
  font-family: var(--mono);
  color: var(--muted);
  transition: color .2s;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
  padding: 26px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

footer p {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
}
footer span { color: var(--dim); }


/* ============================================================
   SCROLL REVEAL UTILITY
   .fi = fade in. Added .in class via IntersectionObserver in JS.
   ============================================================ */
.fi {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.fi.in {
  opacity: 1;
  transform: none;
}

.gh-graph {
  display: flex;
  justify-content: center;
}

.gh-graph img {
  width: 800px;
}


/* ============================================================
   SCROLLBAR — minimal
   ============================================================ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); }


/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  nav { padding: 18px 22px; }
  .nav-links { display: none; } /* hide links on mobile */

  .section,
  #hero,
  #contact { padding: 80px 22px; }

  .hero-name { font-size: clamp(2.6rem, 11vw, 4.5rem); }
  .hero-desc { font-size: 1rem; }

  /* Stack project grid */
  .proj-grid { grid-template-columns: 1fr; }
  .proj-card.wide .wide-inner { grid-template-columns: 1fr; gap: 28px; }

  /* Tighter skill label */
  .skill-row { grid-template-columns: 100px 1fr; }

  .scroll-hint { left: 22px; bottom: 28px; }

  footer {
    padding: 22px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}