/* ============================================================
   JITHIN MACHATH — Portfolio CSS
   Aesthetic: Cream+Lavender Light · Navy+Magenta Dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  /* Light — Cream + Muted Teal + Lavender */
  --bg:          #EEE9E0;
  --bg-alt:      #E4DED5;
  --surface:     #F8F5F0;
  --surface-2:   #E8E3DA;
  --border:      #C8C0B8;
  --text:        #1A1420;
  --text-2:      #3D3550;
  --text-3:      #7A7090;
  --accent:      #7A6098;
  --accent-2:    #5A9098;
  --accent-glow: rgba(122,96,152,.13);
  --grad-hero:   linear-gradient(135deg, #B8D0D4 0%, #C4A8C8 50%, #9E8AB0 100%);
  --font-display:'DM Serif Display', Georgia, serif;
  --font-body:   'DM Sans', sans-serif;
  --font-mono:   'Space Mono', monospace;
  --radius:      10px;
  --radius-lg:   18px;
  --shadow:      0 2px 16px rgba(26,20,32,.07);
  --shadow-md:   0 6px 32px rgba(26,20,32,.12);
  --transition:  0.28s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  /* Dark — Midnight Navy + Deep Purple + Magenta */
  --bg:          #050520;
  --bg-alt:      #0A0830;
  --surface:     #140B3A;
  --surface-2:   #1E1050;
  --border:      #3A1A60;
  --text:        #FFFFFF;
  --text-2:      #DDD0EE;
  --text-3:      #9070B0;
  --accent:      #C0409A;
  --accent-2:    #8855CC;
  --accent-glow: rgba(192,64,154,.22);
  --grad-hero:   linear-gradient(135deg, #050520 0%, #2D1054 50%, #8B0057 85%, #A0006A 100%);
  --shadow:      0 2px 16px rgba(0,0,0,.45);
  --shadow-md:   0 6px 32px rgba(0,0,0,.65);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* Iridescent ambient glow — top of page */
body::before {
  content: '';
  position: fixed;
  top: -200px; left: -10%;
  width: 120%; height: 700px;
  background: var(--grad-hero);
  opacity: 0.06;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}
[data-theme="dark"] body::before { opacity: 0.14; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1,h2,h3,h4 { line-height: 1.2; }

/* ── CURSOR ──────────────────────────────────────────────── */
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .1s, width .2s, height .2s;
}
.cursor-follower {
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform .35s cubic-bezier(.25,.46,.45,.94), opacity .2s;
  opacity: 0.5;
}
@media (hover: none) { .cursor, .cursor-follower { display: none; } }

/* ── THEME TOGGLE ────────────────────────────────────────── */
#theme-toggle {
  position: fixed; top: 18px; right: 18px; z-index: 2000;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  font-size: 18px;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(245,242,237,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(17,18,16,.88); }

.nav-inner {
  max-width: 1160px; margin: auto;
  padding: 0 40px;
  height: 60px;
  display: flex; align-items: center; gap: 32px;
}
/* Hamburger hidden on desktop, shown only on mobile via media query */
.hamburger { display: none; }
.nav-brand { text-decoration: none; margin-right: auto; }
.brand-jm {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 4px 8px; border-radius: 5px;
  transition: var(--transition);
}
.brand-jm:hover { border-color: var(--accent); color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 28px; }
.nav-link {
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-2);
  transition: color var(--transition);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.nav-link:hover, .nav-link--active { color: var(--text); border-color: var(--accent); }
.nav-link--cta { color: var(--accent) !important; font-weight: 600; }

.nav-cv {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 6px 14px; border-radius: 6px;
  transition: var(--transition);
}
.nav-cv:hover { border-color: var(--accent); color: var(--accent); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 80px 40px 60px;
  gap: 60px;
  max-width: 1160px; margin: auto;
}
.hero-bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
/* Iridescent full-page background layer */
.hero-bg-grid::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-hero);
  opacity: 0.07;
}
/* Grain texture overlay */
.hero-bg-grid::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.025;
}
.hero-content {
  position: relative; z-index: 1;
  flex: 1; min-width: 0;
  animation: fadeUp .8s ease both;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 7px transparent; } /* iridescent pulse */
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  color: var(--text);
  display: flex; flex-direction: column;
  line-height: 1.0;
  margin-bottom: 16px;
}
.name-line--italic { font-style: italic; color: var(--accent); }
.hero-descriptor {
  font-size: 14px; color: var(--text-3);
  letter-spacing: 0.04em; margin-bottom: 36px;
}
.hero-quote-block {
  display: flex; gap: 14px; align-items: flex-start;
  max-width: 480px; margin-bottom: 40px;
  padding: 20px 22px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 40px; line-height: 1;
  color: var(--accent); opacity: 0.5; flex-shrink: 0;
}
.hero-quote-block blockquote {
  font-size: 15px; font-style: italic;
  color: var(--text-2); line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 11px 22px; border-radius: var(--radius);
  transition: var(--transition); letter-spacing: 0.02em;
}
.btn-primary:hover { background: #9e4d2e; transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-primary--large { padding: 14px 28px; font-size: 14px; }

.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text-2);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  padding: 11px 22px; border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

/* HERO SIDE */
.hero-side {
  position: relative; z-index: 1; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  animation: fadeUp .8s .15s ease both;
}
.hero-stats {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 20px;
  box-shadow: var(--shadow); width: 100%;
}
.stat-item { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display);
  font-size: 22px; color: var(--accent);
}
.stat-label {
  display: block; font-size: 11px;
  color: var(--text-3); font-weight: 500; letter-spacing: 0.04em;
}
.stat-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }
.hero-img-wrap { position: relative; }
.hero-portrait {
  width: 220px; height: 280px;
  object-fit: cover; border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md); position: relative; z-index: 1;
}
.portrait-ring {
  position: absolute; inset: -10px; border-radius: 24px;
  border: 1.5px dashed var(--accent); opacity: 0.3;
  animation: spin 30s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; font-family: var(--font-mono);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollAnim 2s ease infinite;
}
@keyframes scrollAnim {
  0% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(0.2); transform-origin: bottom; }
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section { padding: 100px 40px; }
.section--alt { background: var(--bg-alt); }
.section--cta { background: linear-gradient(135deg, #1A1420 0%, #2D1054 60%, #8B0057 100%); color: #FFFFFF; }
.section--cta h2 { color: #FFFFFF !important; }
.section--cta p { color: rgba(255,255,255,0.80) !important; }
.section--cta h2 { font-family: var(--font-display); font-size: 36px; color: var(--bg); margin-bottom: 12px; }
.section--cta p { color: var(--bg-alt); margin-bottom: 28px; }
.section-inner { max-width: 1160px; margin: auto; }
.cta-inner { text-align: center; }

.section-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 20px;
}
.label-num { color: var(--accent); min-width: 28px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text); margin-bottom: 40px;
}
.section-title em { font-style: italic; color: var(--accent); }

/* ── ABOUT ───────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 60px; align-items: start;
}
.about-text p { font-size: 15px; color: var(--text-2); margin-bottom: 16px; line-height: 1.75; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: var(--transition);
}
.about-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.about-card-icon { font-size: 20px; margin-bottom: 10px; }
.about-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.about-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; }

/* ── EXPERIENCE ──────────────────────────────────────────── */
.timeline { margin-bottom: 40px; }
.timeline-item {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 32px; padding-left: 20px;
  border-left: 2px solid var(--border);
  padding-bottom: 40px; position: relative;
}
.timeline-item::before {
  content: ''; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent);
  position: absolute; left: -6px; top: 4px;
}
.timeline-year {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-3); letter-spacing: 0.05em;
  padding-top: 2px; text-align: right;
}
.timeline-content h3 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.timeline-org { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.org-link {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.org-link:hover { border-bottom-color: var(--accent); }
.timeline-content p { font-size: 14px; color: var(--text-2); margin-bottom: 12px; line-height: 1.7; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.timeline-tags span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
}
.impact-strip {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 28px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.impact-item { flex: 1; min-width: 180px; }
.impact-label { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.impact-desc { font-size: 13px; color: var(--text-2); }

/* ── SKILLS ──────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.skill-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; transition: var(--transition);
}
.skill-block:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.skill-block h4 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.skill-block ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.skill-block li {
  font-size: 13px; color: var(--text-2);
  padding-left: 14px; position: relative; line-height: 1.4;
}
.skill-block li::before { content: '–'; position: absolute; left: 0; color: var(--accent); opacity: 0.6; }

.tools-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 16px; }
.tools-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px; transition: var(--transition);
}
.tool-chip:hover { border-color: var(--accent); }
.tool-chip img { width: 22px; height: 22px; object-fit: contain; }
.tool-chip span { font-size: 13px; font-weight: 500; }

/* ── EDUCATION ───────────────────────────────────────────── */
.edu-timeline { display: flex; flex-direction: column; gap: 20px; }
.edu-item {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; transition: var(--transition);
}
.edu-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.edu-item--cert { border-left: 3px solid var(--accent); }
.edu-logo-wrap {
  flex-shrink: 0; width: 52px; height: 52px;
  background: var(--surface-2); border-radius: 10px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.edu-logo { width: 44px; height: 44px; object-fit: contain; }
.edu-body { flex: 1; }
.edu-year { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; margin-bottom: 6px; }
.edu-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.edu-inst { display: inline-block; font-size: 13px; font-weight: 500; color: var(--accent-2); text-decoration: none; margin-bottom: 10px; transition: color var(--transition); }
.edu-inst:hover { color: var(--accent); }
.edu-body p { font-size: 13px; color: var(--text-2); line-height: 1.65; }
.cert-links { display: flex; gap: 16px; margin-top: 12px; }
.cert-links a { font-size: 12px; font-weight: 600; font-family: var(--font-mono); color: var(--accent-2); text-decoration: none; letter-spacing: 0.04em; transition: color var(--transition); }
.cert-links a:hover { color: var(--accent); }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 80px 40px 60px; }
.page-header-inner { max-width: 1160px; margin: auto; }
.back-link {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-3); text-decoration: none; margin-bottom: 28px; transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }
.page-title { font-family: var(--font-display); font-size: clamp(40px, 6vw, 70px); line-height: 1.05; margin-bottom: 16px; }
.page-title em { font-style: italic; color: var(--accent); }
.page-subtitle { font-size: 15px; color: var(--text-2); max-width: 540px; }

/* ── PROJECTS PAGE ───────────────────────────────────────── */
.projects-page { padding: 60px 40px 100px; }
.projects-page-inner { max-width: 1160px; margin: auto; }

.global-disclaimer {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 40px; color: var(--text-3);
}
.global-disclaimer svg { flex-shrink: 0; margin-top: 1px; }
.global-disclaimer p { font-size: 12px; line-height: 1.5; }

/* PROJECT ENTRY CARD */
.project-entry {
  background: var(--proj-color-bg, var(--surface));
  border: 1.5px solid var(--proj-color, var(--border));
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
/* is-open styles now per-project — see PER-PROJECT ACCENT COLOURS */

.project-entry-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 30px 32px; cursor: pointer; user-select: none; gap: 24px;
  position: relative; z-index: 1;
}
/* expand-btn hover now per-project */

.peh-left { display: flex; gap: 20px; align-items: flex-start; }
.proj-num {
  font-family: var(--font-mono); font-size: 28px; font-weight: 700;
  color: var(--border); flex-shrink: 0; line-height: 1; padding-top: 4px; transition: color var(--transition);
}
/* proj-num open colour now per-project */

.peh-meta { }
.proj-domain-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px; font-family: var(--font-mono); display: block;
}
.proj-title { font-family: var(--font-display); font-size: 26px; color: var(--text); margin-bottom: 6px; }
.proj-tagline { font-size: 13px; color: var(--text-2); max-width: 480px; line-height: 1.5; }

.peh-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.proj-duration {
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-3); padding: 4px 12px; border-radius: 4px; white-space: nowrap;
  font-family: var(--font-mono);
}
.expand-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0;
}
.expand-icon { transition: transform var(--transition); display: block; }
.project-entry.is-open .expand-icon { transform: rotate(45deg); }

.project-entry-body {
  display: none;
  padding: 28px 32px 36px;
  border-top: 1px solid var(--border);
  animation: fadeUp .4s ease both;
  position: relative; z-index: 1;
}
.project-entry.is-open .project-entry-body { display: block; }

/* ── PER-PROJECT ACCENT COLOURS ─────────────────────────── */
#proj-draco     { --proj-color: #0E7C7B; --proj-color-glow: rgba(14,124,123,.12);  --proj-color-bg: rgba(14,124,123,.06); }
#proj-bandicoot { --proj-color: #C4622D; --proj-color-glow: rgba(196,98,45,.12);   --proj-color-bg: rgba(196,98,45,.06); }
#proj-ggaiter   { --proj-color: #C2446E; --proj-color-glow: rgba(194,68,110,.12);  --proj-color-bg: rgba(194,68,110,.06); }
#proj-mobilityplus { --proj-color: #6B8F3E; --proj-color-glow: rgba(107,143,62,.12); --proj-color-bg: rgba(107,143,62,.06); }
#proj-genbot    { --proj-color: #2E6DA4; --proj-color-glow: rgba(46,109,164,.12);  --proj-color-bg: rgba(46,109,164,.06); }
#proj-wilboar   { --proj-color: #C47D0E; --proj-color-glow: rgba(196,125,14,.12);  --proj-color-bg: rgba(196,125,14,.06); }
#proj-gmammoth  { --proj-color: #6B3FA0; --proj-color-glow: rgba(107,63,160,.12);  --proj-color-bg: rgba(107,63,160,.06); }
#proj-gbot      { --proj-color: #3A7A8A; --proj-color-glow: rgba(58,122,138,.12);  --proj-color-bg: rgba(58,122,138,.06); }

/* Tinted card background applied via base rule above */

/* Apply per-project colour to key elements */
.project-entry .proj-domain-tag  { color: var(--proj-color, var(--accent)); }
.project-entry.is-open            { border-color: var(--proj-color, var(--accent)); box-shadow: 0 6px 32px var(--proj-color-glow, var(--accent-glow)); }
.project-entry.is-open .proj-num  { color: var(--proj-color, var(--accent)); }
.project-entry-header:hover .expand-btn { border-color: var(--proj-color, var(--accent)); color: var(--proj-color, var(--accent)); }
.project-entry .psec-dot          { background: var(--proj-color, var(--accent)); }
.project-entry .proj-ref-link     { color: var(--proj-color, var(--accent-2)); border-color: var(--proj-color, var(--accent-2)); }
.project-entry .proj-ref-link:hover { color: var(--proj-color, var(--accent)); filter: brightness(1.15); }
.project-entry .phase-badge       { background: var(--proj-color, var(--accent)); }
.project-entry .contribution-list li::before { color: var(--proj-color, var(--accent)); }
.project-entry .keyword-cloud span:hover { border-color: var(--proj-color, var(--accent)); color: var(--proj-color, var(--accent)); }
.project-entry .skill-achieved-item:hover { border-color: var(--proj-color, var(--accent)); }
.project-entry .contact-card-icon { color: var(--proj-color, var(--accent)); }


/* ── PROJECT SECTIONS ────────────────────────────────────── */
.proj-section--name-ref {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.proj-name-block { flex: 1; min-width: 220px; }
.proj-full-name { font-family: var(--font-display); font-size: 22px; color: var(--text); margin-bottom: 8px; }
.proj-one-liner { font-size: 14px; color: var(--text-2); line-height: 1.65; max-width: 560px; }

.proj-ref-link {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  border-bottom: 1px dashed var(--accent-2);
  padding-bottom: 1px;
  transition: var(--transition);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 6px;
}
.proj-ref-link:hover { color: var(--accent); border-color: var(--accent); }
.proj-ref-link svg { flex-shrink: 0; }
.ref-link-label { display: none; }
.ref-link-domain { display: none; }

/* DEV FLOW */




/* BODY GRID */
.proj-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 4px; }
.proj-section { margin-bottom: 0; }
.proj-section--full { grid-column: 1 / -1; }

.proj-section-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
}
.psec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.gallery-hint { font-size: 10px; font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--text-3); opacity: 0.7; }
.proj-section-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }

.app-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.app-tags span {
  font-size: 12px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); padding: 5px 12px; border-radius: 20px;
}

.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-cloud span {
  font-size: 12px; font-weight: 600; font-family: var(--font-mono);
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text-3); padding: 4px 10px; border-radius: 4px; transition: var(--transition);
}
.keyword-cloud span:hover { border-color: var(--accent); color: var(--accent); }

.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-phase { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.role-phase-title { margin-bottom: 14px; }
.phase-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 4px;
}
.phase-badge--b { background: var(--accent-2); }
.contribution-list { list-style: none; display: flex; flex-direction: column; gap: 9px; padding: 0; }
.contribution-list li { font-size: 13px; color: var(--text-2); line-height: 1.55; padding-left: 18px; position: relative; }
.contribution-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 1px; }

.skills-achieved-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-achieved-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; transition: var(--transition);
}
.skill-achieved-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.sa-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.skill-achieved-item strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.skill-achieved-item p { font-size: 12px; color: var(--text-2); line-height: 1.55; margin: 0; }

/* GALLERY */
.project-gallery h4, .proj-section-label { }
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.gallery-item {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform var(--transition); }
.gallery-item:hover img { transform: scale(1.04); }

/* Watermark overlay */
.gallery-item::after {
  content: '© Jithin Machath';
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

/* UPCOMING */
.project-upcoming {
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg); padding: 48px; text-align: center;
}
.upcoming-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); display: block; margin-bottom: 10px; }
.upcoming-inner h3 { font-family: var(--font-display); font-size: 22px; color: var(--text-2); margin-bottom: 8px; }
.upcoming-inner p { font-size: 14px; color: var(--text-3); }

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 90vw; max-height: 88vh; border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: scale(.95); transition: transform .3s;
}
.lightbox.active .lightbox-img { transform: scale(1); }

/* Watermark on lightbox */
.lightbox::after {
  content: '© Jithin Machath';
  position: absolute;
  bottom: calc(50% - 44vh);
  right: calc(50% - 44vw);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  pointer-events: none;
  user-select: none;
  z-index: 9001;
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: 1.5px solid rgba(255,255,255,.3);
  color: white; font-size: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .2s;
}
.lightbox-close:hover { border-color: white; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer { padding: 32px 40px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { max-width: 1160px; margin: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.footer-role { font-size: 12px; color: var(--text-3); }
.footer-link { margin-left: auto; font-size: 12px; color: var(--accent-2); text-decoration: none; font-family: var(--font-mono); transition: color var(--transition); }
.footer-link:hover { color: var(--accent); }


/* Comet border animation removed */

/* ── ANIMATION ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 60px 24px 40px; min-height: auto; }
  .hero-side { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .hero-portrait { width: 160px; height: 200px; }
  .hero-bg-grid { display: none; }
  .hero-scroll-hint { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .timeline-year { text-align: left; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px 20px;
    gap: 0;
    z-index: 999;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links .nav-link {
    display: block;
    padding: 13px 0;
    font-size: 15px;
    color: var(--text);
  }
  .nav-links .nav-link--cta,
  .nav-links .nav-link--active {
    color: var(--accent);
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    padding: 7px 8px;
    transition: var(--transition);
  }
  .hamburger:hover { border-color: var(--accent); }
  .hamburger span {
    display: block;
    height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
  }
  .hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .section { padding: 60px 24px; }
  .page-header { padding: 60px 24px 40px; }
  .projects-page { padding: 40px 24px 60px; }
  .project-entry-header { padding: 20px; }
  .project-entry-body { padding: 0 20px 28px; }
  .proj-body-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .skills-achieved-grid { grid-template-columns: 1fr 1fr; }
  .proj-section--name-ref { flex-direction: column; }
  .proj-ref-link { width: auto; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .stat-divider { width: 100%; height: 1px; }
  .impact-strip { flex-direction: column; }
  .proj-title { font-size: 20px; }
  .skills-achieved-grid { grid-template-columns: 1fr; }
}

/* ── GALLERY PLACEHOLDER ─────────────────────────────────── */
.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  text-align: center;
}
.gallery-placeholder p {
  font-size: 13px;
  margin: 0;
}

/* ── PROJ CODENAME ───────────────────────────────────────── */
.proj-codename {
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  padding: 1px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── CONTACT SECTION ─────────────────────────────────────── */
.section--contact {
  background: var(--bg-alt);
  padding: 80px 40px;
}

/* ── CONTACT LAYOUT ── */
.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.contact-left { max-width: 520px; }

.contact-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 20px;
}

.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22C55E;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25);
  padding: 6px 14px;
  border-radius: 20px;
}

.avail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}

/* ── CONTACT CARDS ROW ── */
.contact-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  min-width: 150px;
  flex: 1;
  max-width: 200px;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contact-card:hover::before { opacity: 0.05; }

.contact-card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  position: relative; z-index: 1;
  transition: var(--transition);
}

.contact-card:hover .contact-card-icon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.contact-card-body {
  position: relative; z-index: 1;
  text-align: center;
}

.contact-card-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.contact-card-value {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}

.contact-arrow {
  color: var(--accent);
  flex-shrink: 0;
  position: relative; z-index: 1;
  opacity: 0;
  transition: var(--transition);
}

.contact-card:hover .contact-arrow { opacity: 1; }

/* Footer links */
.footer-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

/* ── CONTACT RESPONSIVE ── */
@media (max-width: 900px) {
  .section--contact { padding: 60px 24px; }
  .contact-right { gap: 10px; }
  .contact-card { min-width: 130px; padding: 18px 16px; }
}

@media (max-width: 480px) {
  .contact-card { max-width: 100%; flex: 0 0 calc(50% - 6px); }
}
