/* ===== Theme Variables ===== */
:root, [data-theme="dark"] {
  --footer-height: 100px;
  --bg: #1b1d22;
  --text: #d4d4d4;
  --text-strong: #fff;
  --text-muted: #abafb6;
  --shimmer-color: #a882ff;
  --shimmer-mid: #d4b8ff;
  --shimmer-base: #fff;
  --input-bg: rgb(21, 23, 27);
  --input-text: rgb(255, 255, 255);
  --input-placeholder: rgb(171, 175, 182);
  --input-focus-border: #3a3e49;
  --btn-bg: rgb(58, 62, 73);
  --btn-hover: rgb(72, 76, 87);
  --btn-text: rgb(255, 255, 255);
  --footer-text: #3a3e49;
  --social-fill: #8f95a3;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --card-shadow-hover: rgba(0, 0, 0, 0.16);
  --logo-fill: white;
  --toggle-bg: rgba(255, 255, 255, 0.08);
  --toggle-hover: rgba(255, 255, 255, 0.15);
  --toggle-icon: #d4d4d4;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --text: #3a3e49;
  --text-strong: #1b1d22;
  --text-muted: #6b7080;
  --shimmer-color: #7c5cc4;
  --shimmer-mid: #b39ddb;
  --shimmer-base: #1b1d22;
  --input-bg: #ffffff;
  --input-text: #1b1d22;
  --input-placeholder: #9ca0a8;
  --input-focus-border: #d0d3d9;
  --btn-bg: #1b1d22;
  --btn-hover: #2d3038;
  --btn-text: #ffffff;
  --footer-text: #9ca0a8;
  --social-fill: #5f6573;
  --card-shadow: rgba(0, 0, 0, 0.06);
  --card-shadow-hover: rgba(0, 0, 0, 0.12);
  --logo-fill: #1b1d22;
  --toggle-bg: rgba(0, 0, 0, 0.06);
  --toggle-hover: rgba(0, 0, 0, 0.12);
  --toggle-icon: #3a3e49;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  background-color: var(--bg);
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ===== Layout ===== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 64px var(--footer-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

section > * {
  margin-left: auto;
  margin-right: auto;
}

/* ===== Hero / About ===== */
.hero {
  height: 100vh;
  gap: 64px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: none;
  text-align: center;
}

.logo svg {
  width: 192px;
  height: 92px;
  fill: var(--logo-fill);
  transition: fill 0.3s ease;
}

.logo svg path {
  fill: var(--logo-fill);
  transition: fill 0.3s ease;
}

.hero-heading {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1.2;
  text-align: center;
  color: var(--text-muted);
}

.hero-heading .name {
  font-weight: 600;
  color: var(--text-strong);
}

.hero-heading .role {
  font-weight: 600;
  color: var(--text-strong);
}

.hero-heading .highlight {
  font-weight: 600;
  color: var(--text-strong);
  display: inline;
  background: linear-gradient(45deg, var(--shimmer-base) 0%, var(--shimmer-base) 30%, var(--shimmer-mid) 44%, var(--shimmer-color) 50%, var(--shimmer-mid) 56%, var(--shimmer-base) 70%, var(--shimmer-base) 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease-in-out infinite alternate;
}

@keyframes shimmer {
  from { background-position: 100% 100%; }
  to { background-position: 0% 0%; }
}

/* ===== Companies ===== */
.companies {
  height: 100vh;
  gap: 36px;
  padding-bottom: 0;
}

.companies-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Secondary Heading Pattern ===== */
.section-heading {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
}

.section-heading strong {
  font-weight: 600;
  color: var(--text-strong);
}

.companies-subtitle {
  max-width: 640px;
}

.logos-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(100%);
}

.logo-card:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: grayscale(0%);
}

.logo-card:active {
  transform: scale(0.95);
}

.logo-card img {
  height: 80px;
  width: auto;
}

/* ===== Dribbble ===== */
.dribbble-section {
  min-height: 100vh;
  gap: 0;
  padding-bottom: 0;
}

.dribbble-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.dribbble-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dribbble-cta a {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dribbble-cta a:hover {
  opacity: 1;
  transform: scale(1.05);
}

.dribbble-cta a:active {
  transform: scale(0.95);
}

.dribbble-cta svg {
  height: 1em;
  width: auto;
}

.dribbble-cta svg path { fill: #EA4C89 !important; }

/* ===== Work Grid ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.work-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 24px var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--card-shadow-hover);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Contact ===== */
.contact {
  background-color: var(--bg);
  height: 100vh;
  gap: 64px;
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 640px;
}

.contact-heading {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.2;
  color: var(--text-strong);
  text-align: center;
}

/* ===== Contact Form ===== */
.contact-form {
  display: grid;
  grid-template-rows: max-content 1fr max-content;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
}

.contact-form .form-row {
  display: grid;
  grid-auto-flow: column;
  gap: 24px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 100%;
  line-height: 1.4em;
  outline: none;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  background: var(--input-bg);
  color: var(--input-text);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s, background-color 0.3s ease, color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  box-shadow: inset 0 0 0 1px var(--input-focus-border);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--input-placeholder);
}

.contact-form textarea {
  min-height: 0;
  resize: vertical;
  flex: 1;
}

.contact-form input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 100%;
  line-height: 1.4em;
  outline: none;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  background: var(--btn-bg);
  cursor: pointer;
  color: var(--btn-text);
  transition: background 0.2s, color 0.3s ease;
}

.contact-form input[type="submit"]:hover {
  background: var(--btn-hover);
}

/* ===== Footer ===== */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  gap: 32px;
  height: var(--footer-height);
  width: 100%;
  padding: 0 64px 48px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 30%);
}

.footer-copyright {
  font-size: 12px;
  font-weight: 400;
  color: var(--footer-text);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 48px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  opacity: 1;
  transform: scale(1.15);
}

.social-links a:active {
  transform: scale(0.9);
}

.social-links svg {
  width: 24px;
  height: 24px;
}

.social-links svg path { fill: var(--social-fill) !important; transition: fill 0.3s ease; }

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--toggle-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-toggle:hover {
  background: var(--toggle-hover);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.9);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: var(--toggle-icon);
  transition: fill 0.3s ease;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ===== Light Mode Adjustments ===== */
[data-theme="light"] .logo-card img {
  filter: brightness(0) grayscale(100%);
}
[data-theme="light"] .logo-card:hover img {
  filter: brightness(0) grayscale(0%);
}

[data-theme="light"] .contact-form input[type="text"],
[data-theme="light"] .contact-form input[type="email"],
[data-theme="light"] .contact-form textarea {
  box-shadow: inset 0 0 0 1px var(--input-focus-border);
}

[data-theme="light"] .contact-form input[type="text"]:focus,
[data-theme="light"] .contact-form input[type="email"]:focus,
[data-theme="light"] .contact-form textarea:focus {
  box-shadow: inset 0 0 0 2px #7c5cc4;
}

.br-tablet { display: none; }
.br-mobile { display: none; }

/* ===== Responsive: Tablet ===== */
@media (max-width: 1199px) {
  .hero-heading { font-size: clamp(30px, 3.5vw, 40px); }
  .contact-heading { font-size: 36px; }
  .hero { gap: 40px; }
  .br-desktop { display: none; }
  .br-tablet { display: inline; }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 809px) {
  section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .theme-toggle {
    top: 32px;
    left: 32px;
    width: 36px;
    height: 36px;
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  .hero {
    gap: 48px;
  }

  .logo svg {
    width: 140px;
    height: 67px;
  }

  .hero-heading {
    font-size: 30px;
    letter-spacing: -0.5px;
  }

  .br-desktop { display: none; }
  .br-tablet { display: none; }
  .br-mobile { display: inline; }

  .hero-content {
    max-width: 100%;
  }

  .companies {
    height: auto;
    min-height: 100vh;
    gap: 24px;
    padding-bottom: var(--footer-height);
  }

  .section-heading {
    font-size: 18px;
  }

  .logos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
    width: 100%;
  }

  .logo-card {
    justify-content: center;
  }

  .logo-card img { height: 60px; }

  .dribbble-section {
    height: auto;
    min-height: 100vh;
    gap: 20px;
    padding-bottom: var(--footer-height);
  }

  .dribbble-cta a {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .dribbble-cta svg {
    height: 1em;
  }

  .work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .work-card {
    width: 100%;
    max-width: none;
  }

  .contact {
    height: auto;
    min-height: 100vh;
    padding-bottom: var(--footer-height);
  }

  .contact-heading {
    font-size: 28px;
  }

  .contact-form .form-row {
    grid-auto-flow: row;
  }

  .footer {
    height: var(--footer-height);
    gap: 24px;
    padding-bottom: 24px;
  }
}
