/* ============================================
   SUNNY GYAN — PORTFOLIO DESIGN SYSTEM
   Dark Navy Theme — Standardised
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Arvo:ital,wght@0,400;0,700;1,400&family=Syne:wght@700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --navy:        #0C1629;
  --navy-dark:   #080f24;
  --navy-mid:    #152040;
  --blue-1:      #203D68;
  --blue-2:      #2F5288;
  --orange:      #E8541A;
  --yellow:      #F5D123;
  --white:       #FFFFFF;
  --off-white:   #E8EDF5;
  --muted:       rgba(255,255,255,0.60);
  --border:      rgba(255,255,255,0.09);
  --card-bg:     rgba(255,255,255,0.05);

  --font-hero:   'Bungee Inline', sans-serif;
  --font-body:   'Arvo', serif;
  --font-ui:     'Century Gothic', CenturyGothic, AppleGothic, sans-serif;

  --radius:    12px;
  --radius-lg: 18px;
  --shadow:    0 4px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.40);
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-body); line-height: 1.2; color: var(--white); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p  { font-family: var(--font-ui); font-size: 0.95rem; color: var(--muted); line-height: 1.75; }

/* --- Utilities --- */
.highlight-orange { color: var(--orange); }
.text-white { color: var(--white); }
.text-muted { color: var(--muted); }

/* --- Layout --- */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section    { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }

/* --- SG Pattern Utilities --- */
.sg-pattern-bg {
  position: relative;
  background: linear-gradient(160deg, var(--blue-1) 0%, var(--blue-2) 100%);
}
.sg-pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/Pattern resized.png') repeat;
  background-size: auto;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.sg-pattern-bg > * { position: relative; z-index: 1; }

.sg-pattern-dark {
  position: relative;
}
.sg-pattern-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/Pattern resized.png') repeat;
  background-size: auto;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
.sg-pattern-dark > * { position: relative; z-index: 1; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.4s ease, padding 0.3s ease;
}
.navbar.scrolled {
  background: rgba(12, 22, 41, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 48px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img { height: 42px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.nav-links a:hover { opacity: 1; color: var(--yellow); }
.nav-links a.active { color: var(--yellow); opacity: 1; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  position: fixed;
  right: 24px;
  top: 18px;
  z-index: 600;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 40px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--yellow);
  color: var(--navy);
}
.btn-primary:hover {
  background: #ffe545;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,209,35,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}
.card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
  border-color: rgba(232,84,26,0.3);
}

/* --- Tags --- */
.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.08);
  color: var(--off-white);
}
.tag-orange { background: rgba(232,84,26,0.15); color: var(--orange); }
.tag-teal   { background: rgba(100,180,200,0.15); color: #7ecfdc; }

/* --- Section Labels --- */
.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

/* --- Divider --- */
.divider {
  width: 64px; height: 3px;
  background: var(--orange);
  border-radius: 3px;
  margin: 1.2rem 0;
}

/* --- Page Header (Portfolio / About / Contact) --- */
.page-header {
  padding: 10rem 0 5rem;
  background: linear-gradient(160deg, var(--blue-1) 0%, var(--blue-2) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/Pattern resized.png') repeat;
  background-size: auto;
  opacity: 0.15;
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 80% 60%, rgba(232,84,26,0.15), transparent 70%);
  pointer-events: none;
}
.page-header h1 { color: var(--white); position: relative; z-index: 1; }
.page-header p  { font-family: var(--font-ui); color: rgba(255,255,255,0.65); position: relative; z-index: 1; max-width: 500px; margin: 1rem auto 0; font-size: 1rem; }

/* --- Footer --- */
.footer {
  background: #05090f;
  padding: 56px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo img { height: 36px; }
.footer-logo span {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}
.footer-copy {
  font-family: var(--font-ui);
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-family: var(--font-ui);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--orange); }

/* ============================================
   PORTFOLIO PAGE
   ============================================ */

/* Filter buttons */
.portfolio-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* Portfolio grid — Isotope masonry layout */
.portfolio-grid {
  position: relative; /* required by Isotope absolute positioning */
  width: 100%;
}

/* Clearfix so container grows to wrap floated cards before Isotope takes over */
.portfolio-grid::after {
  content: '';
  display: table;
  clear: both;
}

/* Card widths — float: left so Isotope can measure them before converting to position:absolute.
   Integer columnWidth is calculated in JS (Math.floor(containerW / 3)) to avoid floating-point
   rounding: 33.333% in px can be 378.67 → Math.floor(1136/378.67)=2, not 3. */
.portfolio-card {
  float: left;
  width: 31%;
  margin: 0 0% 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.portfolio-card:hover {
  border-color: rgba(232,84,26,0.4);
  box-shadow: var(--shadow-lg);
}
.portfolio-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.portfolio-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.portfolio-card:hover .portfolio-card-img { transform: scale(1.05); }
.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12,22,41,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-card:hover .portfolio-card-overlay { opacity: 1; }
.portfolio-card-overlay span {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  border: 1.5px solid var(--white);
  padding: 10px 24px;
  border-radius: 50px;
}
.portfolio-card-body {
  padding: 20px 22px 24px;
}
.portfolio-card-body h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 6px 0 6px;
}
.portfolio-card-body p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 25, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-body { padding: 2rem 2.5rem 2.5rem; }
.modal-tag { margin-bottom: 0.75rem; }
.modal-body h2 {
  font-family: var(--font-body);
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.modal-body h4 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 1.5rem 0 0.6rem;
}
.modal-body p { font-size: 0.95rem; line-height: 1.8; color: rgba(255,255,255,0.65); }
.modal-body ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}
.modal-body ul li {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 4px;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  color: #333;
  transition: background 0.2s;
  z-index: 10;
}
.modal-close:hover { background: rgba(0,0,0,0.12); color: #000; }

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  align-items: start;
}
.about-intro-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 1.5rem;
  line-height: 1.25;
}
.about-intro-text p { margin-bottom: 1rem; }
.about-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.about-stat {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 0.5rem;
}
.about-stat .stat-num {
  font-family: var(--font-hero);
  font-size: 2.2rem;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 4px;
}
.about-stat .stat-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Visual card */
.about-visual-card {
  background: linear-gradient(160deg, var(--blue-1), var(--blue-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-visual-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/Pattern resized.png') repeat;
  background-size: auto;
  opacity: 0.12;
  pointer-events: none;
}
.about-visual-card > * { position: relative; z-index: 1; }
.av-name {
  font-family: var(--font-hero);
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 4px;
}
.av-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.about-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* Skills */
.skills-section { background: var(--navy-dark); padding: 6rem 0; position: relative; }
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.skill-item { margin-bottom: 1rem; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.skill-name {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
}
.skill-pct {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 700;
}
.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #f5a623);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* Principles */
.principles-section { background: var(--navy); padding: 6rem 0; }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 3rem;
}
.principle-card {
  border-left: 3px solid var(--orange);
  padding: 28px 22px;
  background: rgba(255,255,255,0.04);
  border-radius: 0 8px 8px 0;
}
.principle-icon { width: 50px; height: 50px; margin-bottom: 14px; }
.principle-card h3 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.principle-card p { font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  background: var(--navy);
}
.contact-email-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--orange);
  margin: 2rem 0;
  transition: opacity 0.2s;
}
.contact-email-link:hover { opacity: 0.75; }
.contact-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  margin: 1.5rem auto;
}
.social-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  transition: all var(--transition);
  cursor: pointer;
}
.social-card:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(232,84,26,0.15);
}
.social-icon { font-size: 1.2rem; }
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232,84,26,0.1);
  color: var(--orange);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.availability-dot {
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.6; }
}

.fade-up   { animation: fadeUp 0.7s ease both; }
.fade-up-2 { animation: fadeUp 0.7s 0.15s ease both; }
.fade-up-3 { animation: fadeUp 0.7s 0.30s ease both; }

/* ============================================
   GRID UTILITIES
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ============================================
   PORTFOLIO CARD — HIDDEN STATE
   ============================================ */
.portfolio-card.hidden { display: none; }

/* ============================================
   ISOTOPE v1 — required layout classes
   (copied from bootstrap-portfolio/css/isotope.css)
   ============================================ */

.isotope-item { z-index: 2; }
.isotope-hidden.isotope-item { pointer-events: none; z-index: 1; }

/* Isotope CSS3 transitions — container resizes, items slide */
.portfolio-grid,
.portfolio-grid .portfolio-card {
  transition-duration: 0.8s;
}
.portfolio-grid {
  transition-property: height, width;
}
.portfolio-grid .portfolio-card {
  transition-property: transform, opacity, left, top;
}

/* Disable transitions while resizing / reflow */
.portfolio-grid.no-transition,
.portfolio-grid.no-transition .portfolio-card,
.portfolio-grid .portfolio-card.no-transition {
  transition-duration: 0s;
}

/* ============================================
   MODAL INTERNALS — Case Study Layout (old-site style)
   ============================================ */

/* Modal box — white/light background */
.modal-box {
  background: #ffffff;
  border: 1px solid #d8dce8;
  border-radius: var(--radius-lg);
  max-width: 1200px;
  width: 90%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  color: #1a1a1a;
}
.modal-overlay.open .modal-box { transform: translateY(0); }

/* Case Study Header — centered title + tagline */
.cs-header {
  position: relative;
  padding: 2.5rem 5rem 1.75rem;
  text-align: center;
  border-bottom: 1px solid #e4e8f0;
}
.cs-header h2 {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.cs-tagline {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

/* Case Study Body — 70% width, centered */
.cs-body {
  width: 70%;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

/* Opening description — centered */
.cs-description {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: #333;
  line-height: 1.8;
  margin: 0 auto 2.5rem;
  padding-top: 0.25rem;
}

/* Hero / main project image */
.cs-hero {
  display: block;
  max-width: 80%;
  margin: 0 auto 2.5rem;
  border-radius: 4px;
}

/* Section wrapper */
.cs-section {
  margin-bottom: 2.25rem;
}
.cs-section h5 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.6rem;
}
.cs-section p {
  font-family: var(--font-ui);
  font-size: 0.93rem;
  color: #333;
  line-height: 1.85;
  margin-bottom: 0.5rem;
}
.cs-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.4rem 0 0.75rem;
}
.cs-section ul li {
  font-family: var(--font-ui);
  font-size: 0.93rem;
  color: #333;
  line-height: 1.75;
  margin-bottom: 0.3rem;
}

/* Single centered section image */
.cs-img {
  display: block;
  max-width: 90%;
  margin: 0.75rem auto 0.5rem;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* 2-column image grid */
.cs-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.75rem 0;
}
.cs-2col img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Visit Website bordered button — centered */
.cs-link {
  display: block;
  width: 45%;
  min-width: 180px;
  margin: 2.5rem auto 0;
  padding: 0.75rem 0;
  text-align: center;
  border: 2px solid #1a1a1a;
  border-radius: 3px;
  color: #1a1a1a;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.cs-link:hover {
  background: #1a1a1a;
  color: #fff;
}

/* Footer — Close + Back To Top */
.cs-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid #e4e8f0;
  background: #f7f8fb;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.cs-footer button {
  padding: 0.45rem 1.5rem;
  border: 1px solid #bbb;
  background: #fff;
  color: #333;
  cursor: pointer;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  transition: background 0.2s;
}
.cs-footer button:hover { background: #ebebeb; }

/* ============================================
   ABOUT PAGE — SKILL ROWS (existing markup)
   ============================================ */

.skills-group h3 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}
.skill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.1rem;
}
.skill-row .skill-name {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  min-width: 110px;
}
.skill-row .skill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.skill-row .skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #f5a623);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.skill-row .skill-fill.teal {
  background: linear-gradient(90deg, #2F5288, #4b8fcf);
}
.skill-row .skill-pct {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* Section variants (about.html) */
.section-beige { background: var(--navy-dark); }
.section-dark {
  background: var(--navy);
  position: relative;
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/Pattern resized.png') repeat;
  background-size: auto;
  opacity: 0.05;
  pointer-events: none;
}
.section-dark > .container { position: relative; z-index: 1; }
.section-dark .section-label span { color: var(--orange); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .about-intro     { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid     { grid-template-columns: 1fr; }
  .grid-2          { grid-template-columns: 1fr; }
}

/* 2-column card layout: 480px–899px CSS pixels */
@media (max-width: 899px) {
  .portfolio-card  { width: 49%; margin: 0 0% 24px; }
}

/* Hamburger → X animation */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle span { transition: transform 0.3s ease, opacity 0.2s ease; }

@media (max-width: 768px) {
  .navbar          { padding: 14px 24px; }
  .navbar.scrolled { padding: 10px 24px; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 22, 41, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 300;
  }
  .nav-links.open  { display: flex; }
  .nav-links a     { font-size: 1.1rem; }
  .nav-toggle      { display: flex; }
  .footer          { flex-direction: column; gap: 20px; text-align: center; padding: 40px 24px; }
  .principles-grid { grid-template-columns: 1fr 1fr; }
  .about-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-body      { padding: 1.5rem; }
}

/* 1-column card layout: < 480px CSS pixels */
@media (max-width: 479px) {
  .portfolio-card  { float: none; width: 100%; margin: 0 0 24px; }
}

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

/* ============================================
   LIGHTBOX — click-to-enlarge / slideshow
   ============================================ */

#lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#lightbox-overlay.lb-open {
  opacity: 1;
  pointer-events: all;
}

/* Inner container holds image + caption */
#lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}

#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.7);
  transition: opacity 0.18s ease;
}
#lightbox-img.lb-fade { opacity: 0; }

/* Caption row: label on left, counter on right */
#lightbox-caption-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  gap: 1rem;
}
#lightbox-caption {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}
#lightbox-counter {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

/* Close button — top right of overlay */
#lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 9010;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}
#lightbox-close:hover { color: #fff; }

/* Prev / Next arrow buttons */
#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.8);
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9010;
  transition: background 0.15s, color 0.15s;
}
#lightbox-prev { left: 1.5rem; }
#lightbox-next { right: 1.5rem; }
#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
/* Hide arrows when only one image */
#lightbox-prev.lb-hidden,
#lightbox-next.lb-hidden { display: none; }

/* Thumbnail gallery trigger — "click to preview" overlay */
.cs-gallery-thumb {
  position: relative;
  display: block;
  cursor: pointer;
  margin: 0.75rem 0;
}
.cs-gallery-thumb img {
  width: 100%;
  border-radius: 4px;
  display: block;
  transition: filter 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.cs-gallery-thumb:hover img { filter: brightness(0.72); }
.cs-gallery-thumb::after {
  content: 'Click to Preview  \2192';
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.cs-gallery-thumb:hover::after { opacity: 1; }
