/* =========================================
   NIKHIL KUMAR PORTFOLIO — style.css
   Light mode · Bold editorial · GSAP ready
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f8f7f4;
  --bg-alt:    #f0ede6;
  --ink:       #111111;
  --ink-2:     #444444;
  --ink-3:     #888888;
  --accent:    #1a1a2e;
  --accent2:   #e63946;
  --accent3:   #457b9d;
  --card-bg:   #ffffff;
  --border:    #e0ddd5;
  --tag-bg:    #eeebe3;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 2px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --font-main: 'Outfit', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h:     68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* --- Custom Cursor --- */
.cursor, .cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}
.cursor {
  width: 10px; height: 10px;
  background: var(--accent2);
  transform: translate(-50%, -50%);
  transition: transform 0.05s;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 2px solid var(--accent);
  opacity: 0.35;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.2s, height 0.2s, opacity 0.2s;
}
body:hover .cursor { opacity: 1; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(248, 247, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: height 0.35s ease, border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  height: 52px;
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-right: auto;
}
.logo-dot { color: var(--accent2); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link.active {
  background: var(--tag-bg);
  color: var(--ink);
}
.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent2); transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg);
  padding: 100px 32px 40px;
  z-index: 999;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul { list-style: none; }
.mobile-menu li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.mob-link { font-size: 1.2rem; font-weight: 600; }

/* --- Reveal animation class --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,26,46,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,26,46,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 80px 28px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--ink-2);
  box-shadow: var(--shadow);
  opacity: 0;
}
.badge-dot {
  width: 7px; height: 7px;
  background: #2ecc71;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-title {
  font-family: var(--font-head);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  opacity: 0;
}
.hero-hi {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.hero-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--ink-2);
  font-weight: 400;
  opacity: 0;
}
.role-dynamic {
  font-weight: 700;
  color: var(--accent2);
  font-family: var(--font-head);
}
.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent2);
  font-weight: 300;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--ink-3);
  font-style: italic;
  border-left: 3px solid var(--accent2);
  padding-left: 14px;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  border: 2px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.3);
}
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
}
.stat-item { display: flex; flex-direction: column; }
.stat-val {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-lbl { font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

.hero-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
}
.tech-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
  padding: 4px 12px;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.tech-badge:hover { border-color: var(--accent); color: var(--accent); }

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}
.scroll-hint span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--ink-3), transparent);
  animation: scroll-drop 2.2s ease-in-out infinite;
}
@keyframes scroll-drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: translateY(16px) scaleY(0.5); opacity: 0; }
}

/* =========================================
   SHARED SECTION STYLES
   ========================================= */
.section { padding: 100px 0; }
.section:nth-child(even) { background: var(--bg-alt); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent2);
  margin-bottom: 12px;
}
.section-heading {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 56px;
}

/* =========================================
   ABOUT
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}
.about-content p {
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-content strong { color: var(--ink); }

.one-liner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0;
  background: var(--accent);
  color: #fff;
  padding: 18px 20px;
  border-radius: var(--radius);
}
.ol-icon { font-size: 1.3rem; flex-shrink: 0; }
.one-liner p { color: #fff; font-weight: 500; line-height: 1.6; }
.one-liner p strong { color: #fff; font-weight: 600; }

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--tag-bg);
  padding: 5px 12px;
  border-radius: 999px;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ac-avatar {
  width: 80px; height: 80px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.ac-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.ac-role { font-size: 0.85rem; color: var(--ink-3); margin: 4px 0 14px; }
.ac-focus {
  font-size: 0.82rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.ac-links { display: flex; justify-content: center; gap: 12px; }
.acl {
  font-size: 0.82rem; font-weight: 600;
  background: var(--tag-bg);
  color: var(--accent);
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.acl:hover { background: var(--accent); color: #fff; }

/* =========================================
   SKILLS OVERHAUL
   ========================================= */
.skills-container {
  display: flex;
  gap: 80px;
  align-items: center;
}
.skills-left {
  flex: 0 0 350px;
}
.skills-right {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  flex: 1;
}
.skill-square {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  height: 125px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  cursor: default;
}
.skill-square i, .skill-square > span:first-child, .skill-square svg {
  font-size: 2.2rem !important;
  opacity: 0.95;
  transition: all 0.3s ease;
}
.skill-square span:not(:first-child) {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}
.skill-square:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: #d4af37;
}
.skill-square:hover i, .skill-square:hover > span:first-child, .skill-square:hover svg {
  opacity: 1;
  transform: translateY(-2px);
}

/* =========================================
   PROJECTS (Editorial Premium)
   ========================================= */
.projects {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(130% 70% at 100% 0%, rgba(69,123,157,0.12) 0%, rgba(69,123,157,0) 55%),
    radial-gradient(100% 65% at 0% 100%, rgba(230,57,70,0.10) 0%, rgba(230,57,70,0) 60%),
    linear-gradient(180deg, #f2efe8 0%, #ebe6db 100%);
}

.projects-glow {
  position: absolute;
  inset: auto -140px -140px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.22) 0%, rgba(212,175,55,0) 72%);
  pointer-events: none;
}

.projects-shell {
  position: relative;
  max-width: 1180px;
}

.projects-header {
  text-align: center;
  margin-bottom: 56px;
}

.projects-header .section-label {
  color: #8f6c17;
  margin-bottom: 16px;
}

.projects-header .section-heading {
  margin-bottom: 16px;
  color: #1a1a2e;
}

.projects-subhead {
  max-width: 760px;
  margin: 0 auto;
  color: #5b5f69;
  font-size: 1rem;
  line-height: 1.75;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-card-new {
  position: relative;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card-new:nth-child(even) {
  flex-direction: row-reverse;
}

.project-card-new:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.pcn-img {
  width: 50%;
  height: auto;
  min-height: 340px;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
  flex-shrink: 0;
}

.project-card-new:nth-child(even) .pcn-img {
  border-right: none;
  border-left: 1px solid rgba(255,255,255,0.05);
}

.pcn-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
}

.pcn-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card-new:hover .pcn-img img {
  transform: scale(1.05);
}

.pcn-meta-row {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.pcn-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #fff;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
}

.pcn-content {
  width: 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pcn-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.pcn-desc {
  font-size: 1.05rem;
  color: #9ca3af;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 24px;
}

.pcn-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pcn-stack span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: #d1d5db;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pcn-actions {
  display: flex;
  gap: 12px;
}

.pcn-btn-gh,
.pcn-btn-live {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.pcn-btn-gh {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.pcn-btn-gh:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

.pcn-btn-live {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

.pcn-btn-live:hover {
  background: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

@media (max-width: 900px) {
  .projects-grid {
    gap: 24px;
  }
  .project-card-new,
  .project-card-new:nth-child(even) {
    flex-direction: column;
  }
  .pcn-img,
  .pcn-content {
    width: 100%;
  }
  .project-card-new:nth-child(even) .pcn-img {
    border-left: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .pcn-img {
    height: 260px;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .pcn-content {
    padding: 30px 24px;
  }
  .pcn-title {
    font-size: 1.5rem;
  }
  .pcn-desc {
    font-size: 0.95rem;
  }
}

@media (max-width: 560px) {
  .projects-header {
    margin-bottom: 32px;
  }
  .project-card-new {
    border-radius: 12px;
  }
  .pcn-img {
    height: 220px;
  }
  .pcn-content {
    padding: 24px 20px;
  }
  .pcn-actions {
    flex-direction: column;
  }
}

/* =========================================
   DSA
   ========================================= */
.dsa-intro {
  max-width: 620px;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 40px;
}
.dsa-intro strong { color: var(--ink); }

.dsa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.dsa-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.dsa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dsa-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 10px 0 8px;
}
.dsa-card p { font-size: 0.87rem; color: var(--ink-2); line-height: 1.65; }

.dsa-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.active-badge   { background: #dcfce7; color: #16a34a; }
.focus-badge    { background: #ede9fe; color: #6d28d9; }
.approach-badge { background: #fef9c3; color: #854d0e; }

.dsa-bar {
  height: 6px;
  background: var(--tag-bg);
  border-radius: 999px;
  margin: 14px 0 6px;
  overflow: hidden;
}
.dsa-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent3));
  border-radius: 999px;
  width: 0;
  transition: width 1.2s ease 0.3s;
}
.dsa-pct { font-size: 0.75rem; color: var(--ink-3); font-family: var(--font-mono); }

.dsa-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.dsa-topics span {
  font-size: 0.78rem;
  background: #ede9fe;
  color: #6d28d9;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

/* =========================================
   CERTIFICATIONS
   ========================================= */
.certifications {
  position: relative;
  background:
    radial-gradient(90% 70% at 10% 0%, rgba(212,175,55,0.12), rgba(212,175,55,0) 60%),
    radial-gradient(85% 60% at 90% 100%, rgba(69,123,157,0.10), rgba(69,123,157,0) 60%),
    linear-gradient(180deg, #f4f1e9 0%, #ece7db 100%);
  color: var(--ink);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.cert-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(26,26,46,0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 40%, rgba(230,57,70,0.07) 0 1px, transparent 1px);
  background-size: 180px 180px, 220px 220px;
}

.cert-shell {
  position: relative;
}

.cert-header {
  text-align: center;
  margin-bottom: 42px;
}

.certifications .section-label {
  color: #8f6c17;
  letter-spacing: 0.22em;
}

.certifications .section-heading {
  color: var(--accent);
  margin-bottom: 0;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cert-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: 178px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(247,243,235,0.98) 100%);
  border: 1px solid #d9d2c3;
  border-radius: 18px;
  padding: 16px 18px 14px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 44px;
  width: 3px;
  height: 88px;
  border-radius: 2px;
  background: var(--cert-accent, #84cc16);
}

.cert-card::after {
  content: '';
  position: absolute;
  inset: auto -20px -54px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cert-accent) 0%, transparent 70%);
  opacity: 0.14;
  pointer-events: none;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--cert-accent, #84cc16);
  box-shadow: 0 14px 30px rgba(26,26,46,0.16);
}

.cert-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cert-provider,
.cert-year,
.cert-code {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cert-provider,
.cert-code {
  color: #7b7287;
}

.cert-year {
  color: var(--cert-accent, #84cc16);
  font-weight: 700;
}

.cert-title {
  color: #1f2335;
  font-family: var(--font-head);
  font-size: clamp(1.08rem, 1.7vw, 1.34rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.cert-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e4ddcf;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f2335;
  background: #f5eedb;
  border: 1px solid #d2be89;
  border-radius: 999px;
  padding: 4px 9px;
}

.cert-index {
  position: absolute;
  right: 16px;
  bottom: 4px;
  font-family: var(--font-head);
  font-size: 4.2rem;
  line-height: 1;
  font-weight: 700;
  color: rgba(26,26,46,0.09);
  pointer-events: none;
}

.cert-accent-green { --cert-accent: #84cc16; }
.cert-accent-orange { --cert-accent: #f59e0b; }
.cert-accent-blue { --cert-accent: #3b82f6; }
.cert-accent-violet { --cert-accent: #8b5cf6; }
.cert-accent-lime { --cert-accent: #a3e635; }
.cert-accent-cyan { --cert-accent: #06b6d4; }
.cert-accent-amber { --cert-accent: #fbbf24; }

@media (max-width: 1080px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .cert-grid {
    flex-direction: column;
  }
  .cert-card {
    min-height: 170px;
    padding: 15px 16px 13px;
  }
  .cert-title {
    font-size: 1.06rem;
  }
}

/* =========================================
   ACHIEVEMENTS
   ========================================= */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.ach-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.ach-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ach-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.ach-item p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.55; }

/* =========================================
   STORYTELLING ELEMENTS
   ========================================= */
.story-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.story-text strong {
  color: var(--ink);
  font-weight: 600;
}
.story-bullets {
  margin: 15px 0 25px 0;
  padding-left: 20px;
}
.story-bullets li {
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 10px;
  line-height: 1.6;
}

/* =========================================
   EXTRACURRICULAR
   ========================================= */
.extra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
@media (max-width: 1024px) {
  .extra-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .extra-grid { flex-direction: column; }
}
.extra-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}
.extra-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.ec-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.ec-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.extra-card:hover .ec-img img {
  transform: scale(1.03);
}
.ec-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ec-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.ec-desc {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* =========================================
   CONTACT
   ========================================= */
.contact {
  background: #ececec;
  border-top: 1px solid #dedede;
}

.contact-layout {
  display: grid;
  grid-template-columns: 46% 54%;
  border: 1px solid #dbdbdb;
  background: #f7f7f7;
  min-height: 700px;
}

.contact-left {
  background: #efefef;
  padding: 62px 42px;
  border-right: 1px solid #dedede;
}

.contact-big-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #0f0f11;
  margin-bottom: 34px;
  max-width: 12ch;
}

.contact-left-sub {
  font-size: 1.58rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0f0f11;
  max-width: 12ch;
  margin-bottom: 42px;
}

.contact-info-line {
  margin-bottom: 22px;
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.71rem;
  color: #6c6c6e;
  margin-bottom: 6px;
}

.contact-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1a1a1e;
}

.contact-right {
  background: #f9f9f9;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.contact-mini-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  padding: 22px 26px;
  border-bottom: 1px solid #dedede;
}

.contact-mini-nav span {
  font-size: 0.72rem;
  color: #888;
  font-weight: 600;
}

.contact-mini-nav span.active {
  color: #0f0f11;
}

.contact-mini-nav button {
  border: none;
  background: #f6ef00;
  color: #0f0f11;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 10px 16px;
  border-radius: 2px;
}

.contact-note {
  padding: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #b9bac2;
  max-width: none;
  margin: 0;
}

.contact-form-card {
  background: #0d0d10;
  color: #fff;
  margin: 0;
  width: min(100%, 620px);
  padding: 22px 22px 20px;
  border-radius: 2px;
}

.contact-socials {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-social-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-social-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1e;
  border: 1px solid #cfcfd4;
  border-radius: 50%;
  background: #f8f8f8;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.contact-social-link:hover {
  color: #000;
  border-color: #000;
  transform: translateY(-1px);
}

.contact-form-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  margin-bottom: 14px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-size: 0.7rem;
  color: #a7a7aa;
  margin-bottom: 7px;
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #44444a;
  color: #fff;
  padding: 6px 0 8px;
  font-size: 0.88rem;
  outline: none;
}

.form-field textarea {
  resize: vertical;
  min-height: 82px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: #f6ef00;
}

.contact-submit {
  margin-top: 8px;
  border: none;
  background: #f6ef00;
  color: #111;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 14px 16px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.contact-submit:hover {
  filter: brightness(0.95);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--accent);
  color: rgba(255,255,255,0.6);
  padding: 28px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.footer strong { color: #fff; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .about-grid { flex-direction: column; }
  .about-card-wrap { order: -1; }
  .about-card { max-width: 320px; }

  .skills-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .skills-left {
    flex: 0 0 auto;
    max-width: 100%;
  }
  .skills-right {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .contact-layout {
    flex-direction: column;
  }
  .contact-left {
    border-right: none;
    border-bottom: 1px solid #dedede;
    padding: 44px 30px;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }

  .hero-name { white-space: normal; }

  .project-card { padding: 24px; }
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 36px; }
  .skills-right { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-mini-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .contact-note {
    padding: 20px 24px;
  }
  .contact-right { padding: 16px; }
  .contact-form-card { width: 100%; }
  .form-grid-two {
    flex-direction: column;
  }

  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 500px) {
  .hero-stats { gap: 16px; }
  .stat-val { font-size: 1.3rem; }
  .skills-right { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-square { height: 110px; }
  .contact-left {
    padding: 34px 18px;
  }
  .contact-right {
    padding-bottom: 16px;
  }
  .contact-big-title {
    font-size: 2.1rem;
  }
  .contact-left-sub {
    font-size: 1.24rem;
  }
}
