/* ============================
   SAROJ RAI PORTFOLIO — style.css (Improved)
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg: #222222;
  --bg2: #2a2a2a;
  --surface: #1a1a1a;
  --surface2: #333;
  --border: rgba(255,255,255,0.08);
  --accent: #c8a96e;
  --accent2: #e8d5b0;
  --text: #f0ece4;
  --text-muted: #aaa;
  --text-dim: #666;
  --nav-h: 64px;
  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul, li { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---- NAV ---- */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background-color: rgba(42, 42, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: top 0.35s var(--ease);
}

/* Logo */
.nav-logo {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a,
.nav-links button {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 400;
  background: none;
  border: none;
  padding: 0;
}
.nav-links a:hover,
.nav-links button:hover { color: var(--accent); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 180px;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s var(--ease);
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.dropdown-menu a:hover { color: var(--accent); background: rgba(200,169,110,0.07); }

/* Submenu */
.submenu-group { position: relative; }
.submenu-group > a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.submenu-group > a::after {
  content: '›';
  font-size: 1rem;
  opacity: 0.4;
  margin-left: 8px;
}
.submenu {
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 200px;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: all 0.2s var(--ease);
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.submenu-group:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 2rem 2rem;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1.4rem;
  font-family: var(--ff-display);
  font-weight: 300;
  color: var(--text-muted);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--accent); }

/* Legacy hamburger icons (kept for compatibility) */
#iconOpen, #iconClose {
  padding: 12px;
  color: white;
  cursor: pointer;
  font-size: 22px;
}
#iconClose:hover { color: orange; transform: rotate(10deg); }
.hide { display: none; }

/* ---- HERO ---- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 4rem) 2.5rem 6rem;
  max-width: 860px;
  position: relative;
  z-index: 2;
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.fade-section { transition: opacity 0.6s ease, transform 0.6s ease; will-change: opacity, transform; }
.fade-out { opacity: 0; transform: translateY(-50px); pointer-events: none; }

.hero-eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero-name em { font-style: italic; color: var(--accent); }

/* Legacy .main-text kept for inner pages */
.main-text {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 15px;
}

.hero-bio, .sub-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn-outline, .resume-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  transition: all 0.25s var(--ease);
  text-decoration: none;
  background: none;
}
.btn-outline:hover, .resume-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,169,110,0.06);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.section-number {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: #fff;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.75rem;
}

/* ---- WORKS GRID (Home page) ---- */
#works {
  padding: 5rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.work-item {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  aspect-ratio: 4/3;
  display: block;
  cursor: pointer;
}
.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s;
  filter: saturate(0.75) brightness(0.85);
}
.work-item:hover img {
  transform: scale(1.05);
  filter: saturate(1) brightness(0.55);
}
.work-always-visible {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 100%);
}
.work-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s var(--ease);
}
.work-item:hover .work-overlay { opacity: 1; transform: translateY(0); }
.work-label {
  display: block;
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.work-title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
}
.work-year { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Legacy project grid kept for compatibility */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  height: 500px;
}
.container2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px;
  width: 90%;
  max-width: 1330px;
}
.project-box {
  position: relative;
  height: 400px;
  background-color: #ddd;
  overflow: hidden;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0;
}
@keyframes appear {
  from { opacity: 0; scale: 0.5; }
  to { opacity: 1; scale: 1; }
}
.project-box:hover { transform: translateY(-5px); }
.project-box img { width: 100%; height: 100%; object-fit: cover; }
.project-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-box:hover .project-overlay { opacity: 1; }
.project-title { font-size: 1.5em; margin-bottom: 5px; }
.project-date { font-size: 1.2em; }

/* ---- CONTACT ---- */
#contact, .contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.contact-intro {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.35;
}
.contact-intro strong { color: #fff; font-style: normal; font-weight: 300; }

.contact-socials, .social-icons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}
.contact-socials a, .social-icons a {
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all 0.2s;
  text-decoration: none;
}
.contact-socials a:hover, .social-icons a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,169,110,0.08);
  transform: scale(1.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  gap: 0.75rem;
}
.contact-form input,
.contact-form textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 300;
  transition: border-color 0.2s;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-dim); }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form button {
  align-self: flex-start;
  padding: 0.75rem 2rem;
  background: var(--accent);
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  margin-top: 0.25rem;
}
.contact-form button:hover { background: var(--accent2); transform: translateY(-1px); }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  background-color: #3f3e3e;
}
.footer a { color: var(--accent); transition: color 0.2s; }
.footer a:hover { color: var(--accent2); }

/* ---- INNER PAGE HERO ---- */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 2.5rem 3rem;
  max-width: 800px;
}
.page-hero .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.page-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
}

/* ---- ILLUSTRATION / GALLERY ---- */
.illustration-section, .gallery-section {
  padding: 2rem 2.5rem 5rem;
  background: var(--bg);
  text-align: center;
}
.illustration-section h1, .gallery-section h1 {
  font-family: var(--ff-display);
  font-size: 3rem;
  margin-bottom: 2.5rem;
  color: #fff;
  font-weight: 300;
}

.illustration-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  max-width: 1300px;
  margin: 0 auto;
}

.illustration-card, .gallery-card {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  cursor: pointer;
  transition: transform 0.4s var(--ease);
}
.illustration-card:hover, .gallery-card:hover { transform: scale(1.015); }

.illustration-card img, .gallery-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease, transform 0.5s var(--ease);
  filter: saturate(0.8) brightness(0.9);
}
.illustration-card:hover img, .gallery-card:hover img {
  filter: saturate(1) brightness(0.5);
  transform: scale(1.04);
}

.overlay, .gallery-info {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}
.illustration-card:hover .overlay,
.gallery-card:hover .gallery-info { transform: translateY(0); }

.overlay h3, .gallery-info h3 {
  margin: 0 0 0.35rem;
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
}
.overlay p, .gallery-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- PHOTOSHOP PAGE ---- */
.photoshop-section {
  padding: 2rem 2.5rem 5rem;
  background-color: var(--bg);
  text-align: center;
}
.photoshop-section h1 {
  font-family: var(--ff-display);
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.photoshop-grid, .photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.photoshop-card, .photo-card {
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s;
}
.photoshop-card:hover, .photo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200,169,110,0.35);
}
.photoshop-card img, .photo-card img {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: saturate(0.85);
  transition: filter 0.35s, transform 0.5s var(--ease);
}
.photoshop-card:hover img, .photo-card:hover img {
  filter: saturate(1);
  transform: scale(1.03);
}
.photoshop-info, .photo-card-info { padding: 1.25rem; }
.photoshop-info h3, .photo-card-info h3 {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.4rem;
  font-weight: 300;
}
.photoshop-info p, .photo-card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.55;
}
.photoshop-info a { font-size: 0.85rem; color: var(--accent); }
.photoshop-info a:hover { color: var(--accent2); text-decoration: underline; }

/* ---- OTHER PROJECTS ---- */
.fun-project img, .vector-project img {
  display: block;
  margin: auto;
  width: 75%;
  max-width: 900px;
  height: auto;
  padding: 20px;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0;
}
.vector-project img { width: 50%; }
.fun-project h1 { text-align: center; color: white; font-family: var(--ff-display); font-weight: 300; }

/* ---- WEB PAGE ---- */
.video-card {
  width: 100%;
  max-width: 1000px;
  margin: 2.5rem auto;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.hover-video, .hover-second {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
  object-fit: cover;
  border-radius: var(--radius);
}
.Ecom { text-align: center; color: white; padding: 20px; }
.stop-motion { display: flex; justify-content: center; align-items: center; padding: 20px; }
.motion { text-align: center; color: white; }
.clickme { display: flex; justify-content: center; text-align: center; text-decoration: none; color: white; align-items: center; }
.clickme:hover { color: var(--accent); }
.project-texts {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: auto;
  max-width: 800px;
  line-height: 1.7;
  text-align: center;
}
hr { padding: 15px; border: none; border-top: 1px solid var(--border); }
.video-wrapper { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.video-section { width: 100%; max-width: 900px; text-align: center; }
.responsive-video { width: 100%; height: auto; max-height: 400px; }
.view-button {
  padding: 10px 20px;
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.view-button:hover { background-color: rgba(200,169,110,0.15); color: var(--accent); }

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,0.93);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.lightbox.active, .lightbox[style*="flex"] { display: flex; }

.lightbox-content, .lightbox-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(255,255,255,0.08);
  border-radius: 4px;
}

.lightbox-close, .close {
  position: fixed;
  top: 1.25rem; right: 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all 0.2s;
  z-index: 10000;
  background: var(--bg2);
  font-weight: 300;
}
.lightbox-close:hover, .close:hover { color: var(--accent); border-color: var(--accent); }

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- BACK TO TOP ---- */
#button, #back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  width: 46px; height: 46px;
  text-align: center;
  border-radius: 50%;
  position: fixed;
  bottom: 2rem; right: 2rem;
  transition: background-color 0.3s, opacity 0.4s, visibility 0.4s, transform 0.2s;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  color: #111;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}
#button::after {
  content: "\f077";
  font-family: FontAwesome;
  font-weight: normal;
  font-style: normal;
  font-size: 1.5em;
  line-height: 46px;
  color: #111;
}
#button:hover, #back-top:hover { background-color: var(--accent2); transform: translateY(-2px); }
#button.show, #back-top.visible { opacity: 1; visibility: visible; }

/* ---- RESPONSIVE ---- */
@media screen and (min-width: 900px) {
  #iconOpen, #iconClose { display: none !important; }
}
@media screen and (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  .main-nav { padding: 0 1.25rem; }
  .works-grid { grid-template-columns: 1fr; }
  .illustration-grid, .gallery-grid { grid-template-columns: 1fr; }
  .photoshop-grid, .photo-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  #hero, #works, #contact, .gallery-section, .photoshop-section, .illustration-section, .page-hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .section-line { display: none; }
  .container { padding-bottom: 80px; }
  .fun-project img, .vector-project img { width: 95%; }
  .responsive-video { max-width: 100%; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .contact-form button { align-self: stretch; }
}
@media (max-width: 650px) {
  .motion .next { font-size: 1.5rem; }
  .video-wrapper { gap: 20px; }
  .project-box { width: 100%; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .main-nav { padding: 0 1.5rem; }
}

/* ---- WEB & ANIMATION PAGE ---- */
.web-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2.5rem;
}

.web-section-header {
  margin-bottom: 2rem;
}

.web-section-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.web-section-header h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.web-section-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
}

.web-hint {
  margin-top: 0.5rem !important;
  font-size: 0.82rem !important;
  color: var(--text-dim) !important;
  font-style: italic;
}

.web-preview {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
}

.web-preview img,
.web-video {
  width: 100%;
  display: block;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.35s;
  filter: saturate(0.85) brightness(0.9);
}

.web-preview:hover img { transform: scale(1.02); filter: saturate(1) brightness(0.75); }
.web-video { cursor: pointer; }
.web-video:hover { filter: saturate(1) brightness(1); }

.cssart-preview img {
  max-height: 420px;
  object-fit: contain;
  background: #111;
  padding: 1.5rem;
}

.web-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.web-preview:hover .web-preview-overlay { opacity: 1; }

.web-preview-overlay .clickme {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 3px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  transition: all 0.2s;
}
.web-preview-overlay .clickme:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,169,110,0.1);
}

@media (max-width: 768px) {
  .web-section { padding: 3rem 1.25rem; }
  .web-preview img, .web-video { max-height: 260px; }
}

/* ---- WEB PAGE THUMBNAILS ---- */
.web-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.web-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  cursor: pointer;
  transition: border-color 0.2s;
}
.web-thumb:hover { border-color: var(--accent); }

.web-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  filter: saturate(0.8) brightness(0.85);
  transition: filter 0.3s, transform 0.4s var(--ease);
}
.web-thumb:hover img { filter: saturate(1) brightness(0.7); transform: scale(1.04); }

.web-thumb span {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.web-thumb:hover span { color: var(--accent); }

@media (max-width: 600px) {
  .web-thumbs { grid-template-columns: repeat(2, 1fr); }
}
