/* ============================================================
   Devinda Dasun Portfolio — style.css
   Dark tech aesthetic | Plus Jakarta Sans (site-wide)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg:        #080b12;
  --bg2:       #0d1120;
  --surface:   #111827;
  --surface2:  #1a2236;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00d4ff;
  --accent2:   #7c3aed;
  --text:      #e8eaf0;
  --muted:     #7a85a0;
  --danger:    #ff4d6d;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: var(--font-family);
  --font-body: var(--font-family);
  --radius:    14px;
  --nav-h:     72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------- Canvas Background ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

.logo img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.35));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-hire {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 1.3rem;
  border-radius: 40px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.22);
}

.nav-hire:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.38);
}

/* Mobile hamburger (hidden on desktop) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Section Utilities ---------- */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 2.5rem;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero Section ---------- */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(3.2rem, 7.5vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.4rem;
}

.hero-name .accent {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0, 212, 255, 0.45);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 2.4rem;
  line-height: 1.75;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  border-radius: 40px;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.42);
  opacity: 0.92;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.72rem 1.8rem;
  border-radius: 40px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.18);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image {
  width: min(380px, 90%);
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  object-position: center top;
  position: relative;
  z-index: 2;
  /* Clean frame: inner light edge + gap + accent ring (photo edges stay sharp, not “muddy”) */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 3px rgba(8, 11, 18, 1),
    0 0 0 4px rgba(0, 212, 255, 0.45),
    0 0 0 5px rgba(124, 58, 237, 0.22),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 212, 255, 0.14);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}

/* ---------- About Section ---------- */
#about {
  background: linear-gradient(180deg, transparent, rgba(13,17,32,0.6) 50%, transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.skill-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 40px;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.skill-tag:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* About visual / rings */
.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.about-photo-wrap {
  position: relative;
  z-index: 3;
  border-radius: 50%;
  overflow: hidden;
  width: 260px;
  height: 260px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.12),
    0 0 0 4px rgba(8, 11, 18, 1),
    0 0 0 5px rgba(0, 212, 255, 0.4),
    0 0 0 6px rgba(124, 58, 237, 0.2),
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(0, 212, 255, 0.16);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.dd-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 212, 255, 0.25);
  z-index: 2;
  animation: spin-slow 18s linear infinite;
}

.dd-ring2 {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 1px dashed rgba(124, 58, 237, 0.3);
  z-index: 1;
  animation: spin-slow 30s linear infinite reverse;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Services Section ---------- */
#services {
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.12);
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Tech Stack Section ---------- */
#tech-stack {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
}

.tech-stack-head {
  margin-bottom: 2.75rem;
}

.tech-head-frame {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.5rem;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(17, 24, 39, 0.55), rgba(8, 11, 18, 0.35));
  border: 1px solid var(--border);
  overflow: hidden;
}

.tech-head-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(0, 212, 255, 0.09), transparent 55%),
    radial-gradient(ellipse 60% 45% at 0% 100%, rgba(124, 58, 237, 0.1), transparent 50%);
  pointer-events: none;
}

.tech-head-accent {
  width: 5px;
  min-height: 100%;
  align-self: stretch;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.25);
}

.tech-head-copy {
  position: relative;
  z-index: 1;
  text-align: left;
}

.tech-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.tech-headline {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.tech-gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tech-deck {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 38rem;
}

.tech-skills-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem 1.35rem;
  max-width: 1100px;
  margin: 0 auto;
}

.tech-card {
  background: linear-gradient(145deg, rgba(18, 22, 34, 0.95), rgba(10, 12, 20, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.25rem 1.2rem 1.35rem 1.35rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  border-left: 4px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.22;
  pointer-events: none;
}

.tech-card--fe { border-left-color: #38bdf8; }
.tech-card--fe::before { background: #38bdf8; }

.tech-card--be { border-left-color: #34d399; }
.tech-card--be::before { background: #34d399; }

.tech-card--ai { border-left-color: #a78bfa; }
.tech-card--ai::before { background: #a78bfa; }

.tech-card--cc { border-left-color: #fbbf24; }
.tech-card--cc::before { background: #fbbf24; }

.tech-card--ux { border-left-color: #f472b6; }
.tech-card--ux::before { background: #f472b6; }

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.tech-card--fe:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 28px rgba(56, 189, 248, 0.12); }
.tech-card--be:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 28px rgba(52, 211, 153, 0.12); }
.tech-card--ai:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 28px rgba(167, 139, 250, 0.14); }
.tech-card--cc:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 28px rgba(251, 191, 36, 0.12); }
.tech-card--ux:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 28px rgba(244, 114, 182, 0.14); }

.tech-card-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f2f4f7;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.tech-card-title--long {
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 11, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c8d0de;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Projects Section ---------- */
#projects {
  position: relative;
  z-index: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
}

.highlight-card {
  grid-column: 1 / -1;
  flex-direction: row;
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.1), 0 8px 40px rgba(0,0,0,0.3);
}

.highlight-card .project-thumb {
  min-width: 180px;
  max-width: 180px;
  height: auto;
  font-size: 3.5rem;
  border-radius: 0;
}

.project-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Thumb color variants */
.t-lms  { background: linear-gradient(135deg, #0d1120, #1a3a5c); }
.t1     { background: linear-gradient(135deg, #0d1120, #1c1a40); }
.t2     { background: linear-gradient(135deg, #0d1120, #1a2e1a); }

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.35));
}

.project-info {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.7rem;
  border-radius: 40px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.project-info h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.project-info p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.ptag {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.project-view-hint {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 1rem;
  font-weight: 500;
  opacity: 0.75;
  transition: opacity var(--transition);
}

.project-card:hover .project-view-hint {
  opacity: 1;
}

/* ---------- Project Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg2);
}

.modal-thumb {
  height: 200px;
  background: linear-gradient(135deg, #0d1120, #1a2c50);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-emoji {
  font-size: 5rem;
}

.modal-content {
  padding: 2rem;
}

.modal-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.modal-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.4);
}

.modal-btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
}

.modal-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Contact Section ---------- */
#contact {
  position: relative;
  z-index: 1;
}

.contact-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3.5rem;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.06);
}

.contact-wrapper .section-label { margin-bottom: 0.5rem; }
.contact-wrapper .section-heading { margin-bottom: 2rem; font-size: clamp(2rem, 4vw, 3rem); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.85rem 1.1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea { min-height: 130px; }

.contact-form .btn-primary { align-self: flex-start; }

/* ---------- Footer ---------- */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 5%;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

footer span {
  color: var(--accent);
}

/* ---------- CV Modal ---------- */
.cv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cv-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cv-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.cv-modal-overlay.open .cv-modal-box {
  transform: scale(1);
}

.cv-modal-box h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.cv-modal-box p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.8rem;
}

.cv-modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-eyebrow { justify-content: center; }
  .hero-sub { margin: 0 auto 2.4rem; }
  .hero-btns { justify-content: center; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual { min-height: 280px; }

  .tech-skills-bento {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .tech-stack-head {
    margin-bottom: 1.8rem;
  }

  .tech-head-frame {
    max-width: none;
    margin: 0;
    padding: 1.5rem 1.25rem 1.5rem 0;
  }

  .highlight-card {
    flex-direction: column;
    grid-column: 1;
  }

  .highlight-card .project-thumb {
    min-width: unset;
    max-width: unset;
    width: 100%;
    height: 140px;
  }

  .contact-wrapper {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(8, 11, 18, 0.97);
    backdrop-filter: blur(20px);
    padding: 1.5rem 5%;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-hamburger { display: flex; }
  .nav-hire { display: none; }

  section { padding: 4rem 0; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .modal-content { padding: 1.5rem; }
}
/* ============================================================
   Education Sub-block (inside About section)
   ============================================================ */

.edu-block {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.edu-block-header {
  margin-bottom: 2.5rem;
}

.edu-block-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Timeline spine */
.edu-timeline {
  position: relative;
  padding-left: 2.4rem;
}

.edu-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 65%, transparent 100%);
  border-radius: 2px;
}

/* Individual card */
.edu-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.8rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-item:hover {
  border-color: rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.07);
  transform: translateX(5px);
}

/* Glowing dot on timeline */
.edu-item::before {
  content: '';
  position: absolute;
  left: -2.8rem;
  top: 1.95rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 5px rgba(0, 212, 255, 0.28),
    0 0 14px rgba(0, 212, 255, 0.45);
  z-index: 1;
  transition: box-shadow var(--transition);
}

.edu-item:hover::before {
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 6px rgba(0, 212, 255, 0.45),
    0 0 20px rgba(0, 212, 255, 0.6);
}

/* Meta row: degree + badge */
.edu-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.edu-degree {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Status badges */
.edu-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.26rem 0.9rem;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.22);
  white-space: nowrap;
  flex-shrink: 0;
}

.edu-badge.ongoing {
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border-color: rgba(124, 58, 237, 0.28);
}

/* Institution row */
.edu-institution {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1rem;
}

.edu-institution::before {
  content: '📍';
  font-size: 0.76rem;
  line-height: 1;
}

/* Divider */
.edu-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 1rem;
}

/* Description */
.edu-desc {
  font-size: 0.88rem;
  color: #9aa3b8;
  line-height: 1.76;
  margin: 0;
}

/* Tags */
.edu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

.edu-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.24rem 0.72rem;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.edu-item:hover .edu-tag {
  border-color: rgba(0, 212, 255, 0.18);
  color: #b8c3d8;
  background: rgba(0, 212, 255, 0.04);
}

/* Responsive */
@media (max-width: 900px) {
  .edu-block {
    margin-top: 3.5rem;
    padding-top: 3rem;
  }
}

@media (max-width: 680px) {
  .edu-timeline { padding-left: 1.8rem; }
  .edu-item { padding: 1.3rem 1.1rem; }
  .edu-item::before { left: -2.2rem; top: 1.4rem; }
  .edu-degree { font-size: 0.98rem; }
  .edu-block-title { font-size: 1.9rem; }
}

/* ============================================================
   Hero Social Icons
   ============================================================ */
.hero-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition),
              box-shadow var(--transition);
}

.hero-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

.hero-social-link svg {
  display: block;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .hero-socials { justify-content: center; }
}

/* ============================================================
   Footer — Centered Design
   ============================================================ */
#footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 5%;
}

/* Centered content block */
.footer-center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.footer-logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1;
}

.footer-accent {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.45);
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Circular icon row */
.footer-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition),
              box-shadow var(--transition);
  flex-shrink: 0;
}

.footer-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

.footer-icon-btn svg { display: block; flex-shrink: 0; }

/* Horizontal nav links */
.footer-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
}

.footer-nav-row a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-nav-row a:hover {
  color: var(--text);
}

/* Glowing divider line */
.footer-glow-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.5) 30%,
    rgba(124, 58, 237, 0.5) 70%,
    transparent 100%);
  margin-bottom: 1.2rem;
  border-radius: 2px;
}

/* Bottom bar */
.footer-bottom {
  padding-bottom: 2rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.footer-heart {
  color: #ff4d6d;
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.25); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  56%       { transform: scale(1); }
}

/* Footer responsive */
@media (max-width: 600px) {
  .footer-icon-row { gap: 0.5rem; }
  .footer-nav-row  { gap: 0.4rem 1.2rem; }
  .footer-logo-text { font-size: 1.7rem; }
}