/* ============================================================
   ROBOTICS AI PORTFOLIO — style.css
   ============================================================ */

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

/* CSS Variables */
:root {
  --green: #f5f5f7;
  /* Apple Silver */
  --green-dim: #d2d2d7;
  --green-dark: #86868b;
  --cyan: #2997ff;
  /* Apple Blue */
  --amber: #f56300;
  --red: #ff3b30;
  --bg: #000000;
  /* True Black */
  --bg2: #1c1c1e;
  /* Space Grey */
  --bg3: #2c2c2e;
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.15);
  --text: #f5f5f7;
  /* Silver Text */
  --text2: #86868b;
  /* System Grey */
  --text3: #424245;
}

/* Light Mode Overrides */
body.light-mode {
  --bg: #f5f5f7;
  /* Apple Off-white */
  --bg2: #ffffff;
  --bg3: #f1f1f4;
  --border: rgba(0, 0, 0, 0.05);
  --border2: rgba(0, 0, 0, 0.1);
  --text: #000000;
  /* Pure Black for headers */
  --text2: #323236;
  /* High-contrast dark grey for secondary */
  --text3: #515154;
  /* Solid grey for tertiary labels */
  --green: #000000;
  /* Pure Black focus */
}

body.light-mode .grid-bg {
  opacity: 0.3;
}

body.light-mode .decorative-bg {
  opacity: 0.45;
}

body.light-mode .decorative-bg svg * {
  opacity: 1 !important;
}

body.light-mode body::before {
  opacity: 0.01;
}

body.light-mode .modal-header .logo {
  color: var(--text) !important;
}

/* Base */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(0deg,
      transparent, transparent 2px,
      rgba(45, 212, 191, 0.01) 2px, rgba(45, 212, 191, 0.01) 4px);
  pointer-events: none;
  z-index: 999;
}

/* Decorative background */
.decorative-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  overflow: hidden;
  user-select: none;
}

.bg-illustration {
  position: absolute;
  color: var(--green);
}

.bg-illustration svg {
  width: 100%;
  height: auto;
}

.illus-eq {
  top: 7%;
  left: 5%;
  width: clamp(120px, 15vw, 200px);
  transform: rotate(-3deg);
}



.illus-neuron {
  top: 12%;
  right: 5%;
  width: clamp(200px, 28vw, 400px);
  transform: rotate(2deg);
}

.illus-arm {
  top: 50%;
  right: 6%;
  width: clamp(200px, 28vw, 380px);
  transform: rotate(4deg);
}

@media(max-width: 600px) {

  .illus-neuron,
  .illus-arm {
    display: none;
  }

  .illus-eq {
    width: 140px;
  }
}

/* Grid background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(var(--border2) 1px, transparent 1px),
    linear-gradient(90deg, var(--border2) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.2;
  pointer-events: none;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(var(--bg-rgb, 28, 28, 30), 0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.logo {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff !important;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--text2);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #fff !important;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--green);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  color: var(--text3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.4
  }
}

/* ── Theme Toggle Switch ── */
.theme-toggle {
  background: var(--bg2);
  border: 1px solid var(--border2);
  width: 58px;
  height: 30px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 3px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
  z-index: 2;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  color: #000;
  transition: opacity 0.2s;
}

/* Position mapping */
body.light-mode .toggle-thumb {
  transform: translateX(28px);
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

body.light-mode .sun-icon {
  display: block;
}

body.light-mode .moon-icon {
  display: none;
}

/* Subtle background indicators */
.theme-toggle .track-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  opacity: 0.3;
  pointer-events: none;
}

.theme-toggle .track-icons svg {
  width: 12px;
  height: 12px;
  color: var(--text3);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 3rem 4rem;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-label::before {
  content: '>';
  color: var(--green);
}

h1 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

h1 .accent {
  color: var(--green);
  display: block;
}

h1 .sub {
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  color: var(--text2);
  font-weight: 400;
  display: block;
  margin-top: 0.3rem;
}

.hero-desc {
  font-size: 1.3rem;
  color: var(--text2);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-family: 'DM Mono', monospace;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--green);
  color: #000;
  padding: 0.75rem 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  padding: 0.75rem 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.05);
}

/* Hero terminal */
.hero-terminal {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid var(--border2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.8rem;
  margin-left: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  color: #fff;
}

@media(max-width:900px) {
  .hero-terminal {
    margin: 2rem auto 0;
  }
}

.term-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-title {
  font-size: 1.1rem;
  color: #fff;
  opacity: 0.5;
  margin-left: auto;
  letter-spacing: 0.1em;
}

.term-line {
  font-size: 0.7rem;
  line-height: 2;
  color: var(--text2);
}

.term-line .prompt {
  color: var(--green);
}

.term-line .cmd {
  color: var(--text);
}

.term-line .out {
  color: var(--text3);
}

.term-line .hi {
  color: var(--cyan);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
  display: flex;
  gap: 3rem;
  justify-content: center;
  overflow-x: auto;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green);
}

.stat-label {
  font-size: 0.62rem;
  color: var(--text3);
  letter-spacing: 0.15em;
  margin-top: 2px;
}

/* ── Sections ── */
section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 3rem;
}

.section-label {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '//';
}

h2 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

h2 span {
  color: var(--green);
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
}

.projects-header h2 {
  margin-bottom: 0;
}

@media(max-width: 768px) {
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

.project-filters {
  display: flex;
  gap: 0.5rem;
  background: var(--bg2);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  margin-bottom: 2px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-btn:hover {
  color: var(--text2);
  background: rgba(255, 255, 255, 0.03);
}

.filter-btn.active {
  background: var(--green);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

body.light-mode .filter-btn.active {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1);
}

/* ── Project Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media(max-width: 1000px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  text-decoration: none;
  color: inherit;
  background: rgba(var(--bg-rgb), 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

body.light-mode .project-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

body.light-mode .project-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

/* ── Interactive Education Card (Separate from Project Filtering) ── */
#education-card {
  /* Base card styles (copied from project-card but isolated from filtering JS) */
  background: rgba(var(--bg-rgb, 28, 28, 30), 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;

  /* Layout overrides */
  padding: 2.2rem;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 2.2rem;
  cursor: pointer;
  backface-visibility: hidden;
  transform: translateZ(0);
}

body.light-mode #education-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {

  #education-card,
  .education-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
  }
}

#education-card .honor-icon,
.education-card .honor-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#education-card .honor-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#education-card h3 {

  margin-bottom: 0.6rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

#education-card p {
  font-weight: 500;
  color: var(--text2);
  font-size: 1rem;
  margin: 0;
}

#education-card .edu-date {
  font-size: 0.85rem;
  color: var(--text3);
  margin-top: 8px;
  letter-spacing: 0.05em;
  font-family: 'DM Mono', monospace;
}

#education-card:hover {
  /* Override project-card hover with honor-card hover */
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #education-card:hover {
  border-color: rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Top bar removed for calmer aesthetic */
.project-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.project-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Hover line removed */

.card-tag {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  color: var(--text2);
  display: inline-block;
  margin-bottom: 1.2rem;
  border-radius: 12px;
}

.card-tag.robotics {
  border-color: var(--cyan);
  color: var(--cyan);
}

.card-tag.ai {
  border-color: var(--amber);
  color: var(--amber);
}

.card-tag.cv {
  border-color: var(--red);
  color: var(--red);
}

.card-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-tag {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text3);
  padding: 2px 8px;
  letter-spacing: 0.05em;
}

.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  color: var(--text3);
  font-size: 1rem;
  transition: all 0.2s;
}

.project-card:hover .card-arrow {
  color: var(--text);
  transform: translate(3px, -3px);
}

/* ── Skills & Technical Stack ── */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem 2.5rem;
}

.skill-group h3 {
  font-family: 'IBM Plex Sans', sans-serif;

  font-size: 1.1rem;
  font-weight: 500;

  color: var(--text3);
  letter-spacing: 0.15em;
  /* text-transform: uppercase; */
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-group h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background: var(--bg2);
  border: 1px solid var(--border2);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 200;
  color: var(--text);
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}


/* Icons/Logo place holders (can be added later if needed) */
.skill-tag::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--text3);
  border-radius: 50%;
  opacity: 0.3;
}

body.light-mode .skill-tag {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media(max-width:700px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-text {
  font-size: 1.1rem;
  color: var(--text2);
  line-height: 2;
}

.about-text p {
  margin-bottom: 1rem;
}

.highlight {
  color: var(--green);
}

.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 200;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.82);
}

.info-list li:last-child {
  border: none;
}

.info-list .key {
  color: #fff;
  opacity: 0.6;
  letter-spacing: 0.1em;
}

/* ── Resume ── */
.resume-actions {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  justify-content: flex-start;
}

.resume-viewer-container {
  width: 100%;
  background: rgba(28, 28, 30, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

body.light-mode .resume-viewer-container {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.resume-viewer-container iframe {
  filter: grayscale(0.1);
  transition: filter 0.3s;
}

.resume-viewer-container:hover iframe {
  filter: grayscale(0);
}

/* ── Honors & Awards ── */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.honor-card {
  background: rgba(var(--bg-rgb, 28, 28, 30), 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

body.light-mode .honor-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.honor-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.honor-icon {
  color: var(--green);
  opacity: 0.8;
  flex-shrink: 0;
}

.honor-info h3 {
  font-size: 1.1rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.honor-info p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}

body.light-mode .honor-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.honor-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-mode .honor-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ── Contact ── */
.contact-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  padding: 3rem;
  text-align: center;
  position: relative;
}

.contact-box::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--green);
}

.contact-email {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  margin: 1.5rem 0;
  letter-spacing: -0.01em;
}

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

.contact-link {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text2);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border2);
  transition: all 0.2s;
  cursor: pointer;
  background: none;
}

.contact-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .contact-link:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.02);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text3);
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.d1 {
  animation-delay: 0.1s;
}

.d2 {
  animation-delay: 0.2s;
}

.d3 {
  animation-delay: 0.3s;
}

.d4 {
  animation-delay: 0.4s;
}

/* ── Project Modal (Case Study) ── */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: flex-end;
}

.project-modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 850px;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.project-modal.active .modal-content {
  transform: translateX(0);
}

.modal-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--green);
}

.modal-body {
  padding: 4rem 3rem;
}

.modal-tag {
  color: var(--green);
  font-weight: 500;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.modal-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.modal-desc-long {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 3.5rem;
}

.case-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.case-card {
  padding: 1.8rem;
  background: rgba(45, 184, 75, 0.04);
  border: 1px solid var(--border2);
  border-radius: 12px;
}

.case-card h4 {
  font-size: 1.1rem;
  text-align: center;
  font-weight: 500;
  /* text-transform: uppercase; */
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 1.2rem;
}

.case-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-card li {
  font-size: 0.92rem;
  color: var(--text2);
  margin-bottom: 0.8rem;
  display: flex;
  gap: 12px;
  line-height: 1.4;
}

.case-card li strong {
  font-weight: 500;
  color: var(--green);
  opacity: 0.9;
}

.case-card li::before {
  content: '•';
  color: var(--green);
  font-weight: 800;
}

.case-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.case-img-container {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.case-img-container img {
  width: 100%;
  height: auto;
  display: block;
}

.case-img-caption {
  padding: 1.2rem;
  font-size: 0.8rem;
  color: var(--text3);
  text-align: center;
  font-style: italic;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

@media (max-width: 900px) {
  .modal-content {
    max-width: 100%;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .project-modal.active .modal-content {
    transform: translateY(0);
    transform: translateX(0);
  }

  .case-card-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 3rem 1.5rem;
  }

  .modal-title {
    font-size: 2rem;
  }
}