* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --bg2: #090909;
  --accent: #ffffff;
  --accent2: #888888;
  --accent3: #bbbbbb;
  --muted: rgba(255, 255, 255, 0.45);
  --mid: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.04);
  --glass2: rgba(0, 0, 0, 0.6);
  --sans: "DM Sans", sans-serif;
  --serif: "Playfair Display", serif;
  --r: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 24px;
  right: 5vw;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 100px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  color: var(--accent);
  padding: 0 14px 0 8px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 100px;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ── HERO ── */
section {
  padding: 96px 5vw;
}
#hero {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--accent3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.5);
  }
}
h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 14px;
}
h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero-sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 10px;
  line-height: 1.8;
}
.hero-college {
  font-size: 13px;
  color: var(--accent3);
  font-weight: 600;
  margin-bottom: 28px;
}
.btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-avatar-card {
  margin: 10px 0 30px;
}
.btn-p {
  background: var(--accent);
  color: #000000;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-p:hover {
  background: var(--accent3);
  transform: translateY(-2px);
}
.btn-o {
  background: transparent;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-o:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}
.avatar-wrap {
  position: relative;
  width: 270px;
  height: 270px;
}
.avatar-ring {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    var(--accent2),
    #888888,
    var(--accent)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 10s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.avatar-inner {
  width: 254px;
  height: 254px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.avatar-initials {
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.avatar-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fb {
  position: absolute;
  background: var(--glass2);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 8px 13px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent3);
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}
.fb1 {
  top: 8px;
  right: -24px;
}
.fb2 {
  bottom: 28px;
  left: -28px;
  animation-delay: 1.5s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ── STATS ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px;
  margin: 0 5vw;
  position: relative;
  z-index: 10;
}
.stat-item {
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child {
  border-right: none;
}
.stat-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
}
.stat-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ── SECTION HEADERS ── */
.sec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.sec-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  margin-bottom: 40px;
}
.sec-title span {
  color: var(--accent);
}

/* ── ABOUT ── */
#about {
  background: var(--bg2);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}
.about-text p {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 14px;
  font-weight: 300;
  line-height: 1.85;
}
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--muted);
  font-weight: 400;
  flex-shrink: 0;
}
.info-val {
  font-weight: 600;
  color: #fff;
  text-align: right;
}
.info-val.ac {
  color: var(--accent);
}

/* ── SKILLS ── */
#skills {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 5vw;
}
#skills .sec-title,
#skills .sec-label {
  text-align: center;
}
#skills .sec-title {
  margin-bottom: 24px;
  font-size: clamp(20px, 2.5vw, 32px);
}
#skills .sec-label {
  margin-bottom: 6px;
}
.cat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 48px;
  justify-items: center;
  max-width: 1200px;
  margin: 40px auto 0;
}
.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: none;
  border: none;
  padding: 0;
}
.icon-card i {
  font-size: 42px; /* Reduced from 52px */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.icon-card:hover {
  transform: translateY(-8px);
}
.icon-card:hover i {
  transform: scale(1.15); /* The "pop" effect */
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}
.icon-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: capitalize;
}

/* ── PROJECTS ── */
#projects {
  background: var(--bg2);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 32px;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.proj-img {
  width: 100%;
  height: 320px; /* Increased height to better fit square images */
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a; /* Fallback background */
}
.proj-img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Shows the entire image without cropping */
  object-position: center;
  padding: 10px; /* Internal breathing room */
  transition: transform 0.5s ease;
}
.project-card:hover .proj-img img {
  transform: scale(1.05);
}
.proj-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}
.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.proj-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.proj-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.proj-links a {
  color: var(--muted);
  font-size: 20px;
  text-decoration: none;
  transition: color 0.2s;
}
.proj-links a:hover {
  color: var(--accent);
}
.proj-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  font-weight: 400;
}
.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.stag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent3);
  border: 1px solid var(--border);
}
.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ── EXPERIENCE ── */
#experience {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 5vw;
}
#experience .sec-title {
  margin-bottom: 25px;
  font-size: clamp(20px, 2.5vw, 32px);
}
#experience .sec-label {
  margin-bottom: 6px;
}
.timeline {
  display: flex;
  flex-direction: column;
}
.titem {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  position: relative;
  padding-bottom: 28px;
}
.titem::before {
  content: "";
  position: absolute;
  left: 140px;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(12px);
}
.titem:last-child::before {
  display: none;
}
.tdate {
  text-align: right;
}
.tperiod {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.ttype {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
}
.tdot {
  position: absolute;
  left: 140px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  transform: translateX(7px);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.tbody {
  padding-left: 24px;
}
.trole {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.torg {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.tdesc {
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}
.tbullets {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tbullet {
  font-size: 11px;
  color: var(--mid);
  font-weight: 300;
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.tbullet::before {
  content: "▸";
  color: var(--accent);
  flex-shrink: 0;
  font-size: 10px;
  margin-top: 2px;
}

/* ── CERTS ── */
#certs {
  background: var(--bg2);
}
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.cert-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}
.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--border2);
  background: rgba(255, 255, 255, 0.04);
}
.view-cert-btn {
  margin-top: auto;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
}
.view-cert-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

/* ── MODAL ── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal.active {
  display: flex;
  opacity: 1;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}
.modal-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 85vh;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal.active .modal-container {
  transform: scale(1);
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.close-modal:hover {
  background: #f87171;
  border-color: #f87171;
}
.modal-body {
  width: 100%;
  height: 100%;
}
#cert-viewer {
  width: 100%;
  height: 100%;
}
.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffffff, #dddddd);
  opacity: 0.7;
}
.cert-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.1);
}
.cert-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.cert-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  line-height: 1.3;
}
.cert-issuer {
  font-size: 12px;
  color: var(--muted);
}
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #cccccc;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 2px;
  width: fit-content;
}

/* ── CONTACT ── */
#contact {
  padding: 100px 10vw;
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.contact-sub-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--accent);
}
.contact-subtext {
  color: var(--mid);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 90%;
}
.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.cs-item {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cs-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.cs-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.cs-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
}
.response-time {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.rt-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.response-time p {
  color: var(--muted);
  font-size: 14px;
}
.cform {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fg label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.fg input,
.fg textarea {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.fg input::placeholder,
.fg textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}
.fg input:focus,
.fg textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
}
.fg textarea {
  resize: vertical;
  min-height: 88px;
}
.csub {
  background: var(--accent);
  color: #000000;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}
.csub:hover {
  background: var(--accent3);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
footer {
  background: #050505;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  padding: 20px;
  font-size: 12px;
}
footer span {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 768px) {
  nav {
    width: 94%;
    padding: 5px 6px;
  }
  .nav-logo {
    font-size: 13px;
    padding: 0 10px 0 6px;
  }
  .nav-links a {
    font-size: 10px;
    padding: 6px 8px;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .avatar-wrap,
  .avatar-ring {
    width: 200px;
    height: 200px;
  }
  .avatar-inner {
    width: 186px;
    height: 186px;
  }
  .avatar-initials {
    font-size: 48px;
  }
  .fb {
    display: none;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item {
    border-right: none;
  }
}

/* ── SOCIAL FOOTER ── */
#social-footer {
  padding: 20px 5vw;
  background: #fdfdfd;
  color: #000000;
  text-align: center;
  border-top: 1px solid #eeeeee;
}
.sf-title {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 30px;
  color: #0b1320;
  letter-spacing: -0.01em;
}
.sf-row {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 6vw, 80px); /* Increased gap for more breathing room */
  flex-wrap: wrap;
  align-items: center;
}
.sf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4a5568;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}
.sf-item:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.sf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-icon img {
  width: 50px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.sf-item:hover .sf-icon img {
  transform: scale(1.1);
}
