@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

/* Design Tokens & CSS Custom Properties */
:root {
  /* Color Palette — Off-white base & Warm Gallery Gradients */
  --bg-base: #FAF9F6;
  --bg-surface: #FFFFFF;
  --bg-alt: #F4EFEA;
  --bg-warm: #EFEAE2;
  --bg-nav: rgba(250, 249, 246, 0.88);

  /* High Contrast Typography Colors (WCAG AA Compliant) */
  --text-main: #18191B;
  --text-sub: #454B52;
  --text-muted: #6E747A;

  /* Editorial Accents */
  --accent-emerald: #0F4C3A;
  --accent-emerald-hover: #16644E;
  --accent-emerald-light: rgba(15, 76, 58, 0.08);

  --accent-wine: #722F37;
  --accent-wine-light: rgba(114, 47, 55, 0.08);

  --accent-gold: #C59B27;
  --accent-gold-light: rgba(197, 155, 39, 0.12);

  /* Mapping for legacy Project 1 variables */
  --bg1: #FAF9F6;
  --bg2: #F4EFEA;
  --bg3: #EFEAE2;
  --bg4: #FAF9F6;
  --accent: #0F4C3A;
  --accent2: #722F37;
  --accent3: #C59B27;
  --white: #18191B;
  --muted: #6E747A;
  --card: #FFFFFF;
  --border: #E6E1D8;
  --cc: #0F4C3A;

  /* Borders & Dividers */
  --border-color: #E6E1D8;
  --border-hover: #C8C1B3;
  --border-accent: rgba(15, 76, 58, 0.25);

  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(24, 25, 27, 0.04);
  --shadow-md: 0 10px 30px rgba(24, 25, 27, 0.06), 0 2px 6px rgba(24, 25, 27, 0.03);
  --shadow-lg: 0 20px 45px rgba(24, 25, 27, 0.1), 0 4px 12px rgba(24, 25, 27, 0.04);

  /* Typography Families — Playfair Display & Outfit/Inter */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-smooth);
  --transition-normal: 0.35s var(--ease-smooth);
  
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(197, 155, 39, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(15, 76, 58, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Typography Hierarchy */
h1, h2, h3, h4, .sec-title, .nav-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 5rem;
}

#OngoingIntern>*,
.about-portrait-wrap,
section>* {
  z-index: 1;
  position: relative;
}

.sec-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  text-align: center;
  color: var(--text-main) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  text-shadow: none !important;
}

.sec-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-sub);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.6;
}

/* Header & Glass Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 2rem;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

nav a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-sub);
  transition: color var(--transition-fast);
  padding: 4px 0;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-emerald);
  transition: width var(--transition-fast);
}

nav a:hover,
nav a.active {
  color: var(--accent-emerald);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* Animations & Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.from-left {
  transform: translateX(-30px);
}

.reveal.from-right {
  transform: translateX(30px);
}

.reveal.from-left.visible,
.reveal.from-right.visible {
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }

.reveal:hover,
.reveal *:hover {
  transition-delay: 0s !important;
}

/* Hero Section */
#home {
  flex-direction: column;
  text-align: center;
  padding-top: 8.5rem;
}

#home .hero-inner {
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}

.hero-badge, .section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--accent-emerald-light);
  border: 1px solid rgba(15, 76, 58, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 2rem;
  backdrop-filter: blur(6px);
}

.section-badge .badge-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--accent-emerald);
  text-transform: uppercase;
}

.hero-badge-dot, .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(15, 76, 58, 0.4);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

#typed-text {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.01em;
  word-break: break-word;
  white-space: pre-wrap;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  flex-wrap: wrap;
}

.cursor {
  display: inline-block;
  width: 3px;
  margin-left: 4px;
  background: var(--accent-emerald);
  animation: blink 0.8s step-end infinite;
  border-radius: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.wave-hand {
  display: inline-flex;
  align-items: center;
  transform-origin: 70% 80%;
  animation: wave 1.6s ease-in-out infinite;
}

@keyframes wave {
  0%, 100%, 60% { transform: rotate(0); }
  10%, 30% { transform: rotate(20deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(16deg); }
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.dots {
  margin-top: 2rem;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all var(--transition-fast);
}

.dot.active {
  background: var(--accent-emerald);
  width: 24px;
  border-radius: 10px;
}

.hero-cta-wrap {
  margin-top: 2.2rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeUpDown 2.2s ease-in-out infinite;
  pointer-events: none;
}

.scroll-arrow {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--accent-emerald);
  border-bottom: 2px solid var(--accent-emerald);
  transform: rotate(45deg);
}

@keyframes fadeUpDown {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* About Section — Gallery Frame Feel */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  max-width: 1100px;
  width: 100%;
  align-items: center;
}

.about-portrait-wrap {
  width: 100%;
}

.about-frame {
  position: relative;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  margin-top: 0;
}

.about-frame::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 32px;
  height: 32px;
  border-top: 4px solid var(--accent-emerald);
  border-left: 4px solid var(--accent-emerald);
  border-top-left-radius: 20px;
}

.about-frame::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 32px;
  height: 32px;
  border-bottom: 4px solid var(--accent-gold);
  border-right: 4px solid var(--accent-gold);
  border-bottom-right-radius: 20px;
}

.about-frame-corner.top-right {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 32px;
  height: 32px;
  border-top: 4px solid var(--accent-wine);
  border-right: 4px solid var(--accent-wine);
  border-top-right-radius: 20px;
}

.about-frame-corner.bottom-left {
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 32px;
  height: 32px;
  border-bottom: 4px solid var(--accent-emerald);
  border-left: 4px solid var(--accent-emerald);
  border-bottom-left-radius: 20px;
}

.about-frame:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  background: var(--bg-surface);
  border-color: var(--border-color);
}

.about-text p {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  color: var(--text-sub) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--text-sub) !important;
  text-shadow: none !important;
}

/* Skills Section */
#skills {
  padding: 7rem 2rem 5rem;
}

.skills-page-wrap {
  max-width: 1050px;
  width: 100%;
}

.skill-category {
  margin-bottom: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.skill-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.cat-header {
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.cat-label {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main) !important;
  display: flex;
  align-items: center;
  letter-spacing: normal;
  text-transform: none;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  text-shadow: none !important;
}

.cat-label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 18px;
  border-radius: 4px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--accent-emerald);
  box-shadow: none;
}

.cat-lang .cat-label::before { background: var(--accent-emerald); }
.cat-lib .cat-label::before { background: var(--accent-wine); }
.cat-db .cat-label::before { background: var(--accent-gold); }
.cat-tools .cat-label::before { background: var(--accent-emerald); }
.cat-ai .cat-label::before { background: var(--accent-wine); }
.cat-cloud .cat-label::before { background: var(--accent-gold); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  cursor: default;
}

.skill-tag:hover {
  transform: translateY(-2px);
  background: var(--bg-surface);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: var(--shadow-sm);
}

.skill-logo, .skill-dot img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-point {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: none;
  flex-shrink: 0;
}

.skills-legend {
  display: flex;
  gap: 18px;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: .06em;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Education Timeline Section */
#education {
  padding: 7rem 2rem 5rem;
}

.edu-wrap {
  max-width: 800px;
  width: 100%;
}

.timeline {
  position: relative;
  padding-left: 2.2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-emerald), var(--accent-gold));
  border-radius: 3px;
}

.tl-item {
  position: relative;
  margin-bottom: 2.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.tl-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-emerald);
  transform: translateY(-3px);
}

.tl-dot {
  position: absolute;
  left: -33.7px;
  top: 1.8rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-base);
  background: var(--accent-emerald);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.tl-dot.d2 {
  background: var(--accent-wine);
}

.tl-dot.d3 {
  background: var(--accent-gold);
}

.tl-year {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.tl-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.tl-place {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-wine);
  margin-bottom: 8px;
}

.tl-place.p1 { color: var(--accent-emerald); }
.tl-place.p2 { color: var(--accent-wine); }

.tl-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Projects Section */
#projects {
  padding: 7rem 2rem 5rem;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
  align-items: stretch;
}

.proj-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
  cursor: pointer;
  backdrop-filter: none;
}

.proj-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-gold));
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.proj-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.proj-image {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border-color);
  aspect-ratio: 16/10;
  background-color: var(--bg-alt);
  z-index: 1;
}

.proj-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-smooth);
}

.proj-card:hover .proj-image img {
  transform: scale(1.05);
}

.proj-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.proj-card:hover .proj-title {
  color: var(--accent-emerald);
}

.proj-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 1.2rem;
  display: block;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 1.2rem;
}

.proj-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(15, 76, 58, 0.15);
  transition: all var(--transition-fast);
}

.proj-card:hover .proj-tag {
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border-color: rgba(15, 76, 58, 0.25);
}

.proj-progress-box {
  margin-bottom: 1.2rem;
}

.proj-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-wine);
  margin-bottom: 6px;
  letter-spacing: normal;
}

.proj-progress-percent {
  font-weight: 700;
  color: var(--accent-wine);
  font-size: 0.8rem;
}

.proj-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.proj-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald) 0%, var(--accent-gold) 100%);
  border-radius: 10px;
  box-shadow: none;
  transition: width 0.6s var(--ease-smooth);
}

/* Button & CTA System */
.cert-btn, .proj-link, .c-btn, .RES-BTN {
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.proj-link.view-details-btn {
  margin-top: auto;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--accent-emerald);
  background: var(--accent-emerald-light);
  border: 1px solid rgba(15, 76, 58, 0.2);
  border-radius: 12px;
}

.proj-link.view-details-btn:hover {
  background: var(--accent-emerald);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.cert-btn-primary, .RES-BTN {
  padding: 10px 22px;
  font-size: 0.92rem;
  border-radius: 12px;
  background: var(--accent-emerald);
  color: #FFFFFF;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.cert-btn-primary:hover, .RES-BTN:hover {
  background: var(--accent-emerald-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cert-btn-secondary {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
  background: var(--accent-wine-light);
  color: var(--accent-wine);
  border: 1px solid rgba(114, 47, 55, 0.2);
}

.cert-btn-secondary:hover {
  background: var(--accent-wine);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Certifications Accordion System */
#certifications {
  padding: 7rem 2rem 5rem;
}

.cert-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1000px;
  width: 100%;
}

.cert-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.cert-category[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

.cert-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.8rem;
  user-select: none;
  cursor: pointer;
  background: var(--bg-alt);
  transition: background var(--transition-fast);
}

.cert-category-header::-webkit-details-marker {
  display: none;
}

.cert-category-header:hover {
  background: var(--bg-warm);
}

.cert-category-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cert-category-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.cert-category[open] .cert-category-arrow {
  transform: rotate(-180deg);
  color: var(--accent-emerald);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition-fast);
  height: auto;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-sm);
}

.cert-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
}

.cert-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cert-issuer {
  font-size: 0.82rem;
  color: var(--accent-emerald);
  font-weight: 600;
  margin-bottom: 2px;
}

.cert-year {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#OngoingIntern {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-emerald);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

#OngoingIntern:hover {
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-md);
}

/* Contact Section & Copy Feature Logic */
#contact {
  flex-direction: column;
  text-align: center;
  padding: 7rem 2rem 5rem;
}

.contact-inner {
  max-width: 650px;
  width: 100%;
  margin: 0 auto;
}

.contact-desc {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.email-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.contact-email {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3.2vw, 32px);
  font-weight: 700;
  color: var(--accent-emerald);
  letter-spacing: -0.01em;
  word-break: break-all;
  margin: 0;
}

.email-right {
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: 8px;
  background: var(--bg-surface);
}

.copy-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-content[hidden] {
  display: none !important;
}

.copy-text {
  display: inline-block;
}

.c-btn.primary {
  background: var(--accent-emerald);
  color: #FFFFFF;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.c-btn.primary:hover {
  background: var(--accent-emerald-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.c-btn.outline {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.c-btn.outline:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.c-btn img {
  display: block;
  flex-shrink: 0;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Site Footer */
.site-footer {
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

/* Project Modal — High Contrast Light Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(24, 25, 27, 0.6);
  opacity: 0;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-surface);
  margin: auto;
  padding: 30px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
  font-family: var(--font-sans);
}

.modal-content * {
  font-family: var(--font-sans);
}

.close-btn {
  color: var(--text-muted);
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: color var(--transition-fast);
  z-index: 10;
}

.close-btn:hover {
  color: var(--accent-wine);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-alt);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  border: 1px solid var(--border-color);
}

/* Slider Round Loading Spinner */
.slider-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 3.5px solid var(--border-color);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: sliderSpin 0.7s linear infinite;
  z-index: 10;
  pointer-events: none;
}

@keyframes sliderSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.slider-container.loading .slider-spinner {
  display: block;
}

.slider-container.loading img {
  opacity: 0.35;
}

.slider-container img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s var(--ease-smooth);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.slider-btn:hover {
  background-color: #FFFFFF;
  color: var(--accent-emerald);
  box-shadow: var(--shadow-md);
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

.modal-info h2 {
  font-family: var(--font-serif);
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.7rem;
}

.modal-info p {
  color: var(--text-sub);
  line-height: 1.7;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.modal-action-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 12px;
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(15, 76, 58, 0.2);
}

.modal-action-btn:hover {
  background: var(--accent-emerald);
  color: #FFFFFF;
  transform: translateY(-2px);
}

#modal-demo {
  background: var(--accent-wine-light);
  color: var(--accent-wine);
  border-color: rgba(114, 47, 55, 0.2);
}

#modal-demo:hover {
  background: var(--accent-wine);
  color: #FFFFFF;
}

/* Responsive Breakpoints & Mobile Copy Control */
@media (max-width: 900px) {
  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.75rem;
  }

  #about .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 1rem;
    padding: 0.7rem 1rem;
  }

  nav a {
    font-size: 0.7rem;
  }

  section {
    padding: 6rem 1.2rem 4rem;
  }

  .sec-title {
    font-size: 2.2rem;
  }

  .proj-grid, .cert-grid {
    grid-template-columns: 1fr;
  }

  .email-info {
    flex-direction: column;
    gap: 12px;
  }

  .copy-text,
  .copy-content p {
    display: none !important;
  }

  #textToCopy {
    padding: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .copy-content {
    font-size: 1.1rem;
  }
}
