/* ==========================================================================
   Section-Specific Styles
   ========================================================================== */

/* -------------------------------------------------------------------------
   Mobile Notice Banner
   ------------------------------------------------------------------------- */
.mobile-notice {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #fff;
  padding: var(--space-4);
  z-index: 10000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.mobile-notice-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 600px;
  margin: 0 auto;
}

.mobile-notice-content svg {
  flex-shrink: 0;
}

.mobile-notice-content p {
  flex: 1;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  margin: 0;
}

.mobile-notice-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-1);
  opacity: 0.7;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.mobile-notice-close:hover {
  opacity: 1;
}

.mobile-notice.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-notice {
    display: block;
  }
}

/* -------------------------------------------------------------------------
   Header / Navigation
   ------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 9999;
  transition: all var(--transition-base);
  font-family: 'Inter', sans-serif;
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: 'Inter', sans-serif;
  font-size: var(--font-size-xl);
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: color var(--transition-fast);
}

.logo:hover {
  color: var(--color-accent);
}

.logo span {
  color: var(--color-accent);
}

/* Desktop Navigation */
.nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  position: relative;
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width var(--transition-base) var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

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

/* Mobile Menu Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  gap: 5px;
  cursor: pointer;
  z-index: calc(var(--z-fixed) + 1);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 300px;
  height: 100vh;
  padding: calc(var(--header-height) + var(--space-8)) var(--space-6) var(--space-6);
  background-color: var(--color-bg);
  box-shadow: var(--shadow-2xl);
  transform: translateX(100%);
  transition: transform var(--transition-base) var(--ease-out-expo);
  z-index: var(--z-fixed);
}

.nav-mobile.open {
  transform: translateX(0);
}

.nav-mobile-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav-mobile-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: calc(var(--z-fixed) - 1);
}

.nav-overlay.visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .nav {
    display: block;
  }

  .nav-toggle,
  .nav-mobile,
  .nav-overlay {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------------------- */
.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-text);
}

.hero-image {
  position: relative;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  padding-bottom: var(--space-16);
  overflow: visible;
  background-color: var(--color-bg);
}

/* Gradient blob */
.hero-blob {
  position: absolute;
  top: 13%;
  left: calc(50vw - 700px);
  width: 260px;
  height: 260px;
  background: url('../gradient-new.png') no-repeat center center;
  background-size: contain;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@media (max-width: 1200px) {
  .hero-blob {
    left: 50px;
  }
}

/* Header with title and "hi," */
.hero-header {
  position: relative;
  text-align: left;
  margin-bottom: var(--space-16);
  z-index: 1;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-top: 4rem;
}

.hero .container {
  position: relative;
}

.hero-hi {
  position: absolute;
  top: 0;
  left: 900px;
  font-family: "MalayalamMN", "Malayalam MN", "MalayalamMN-Regular", "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 7.5vw, 5rem);
  font-weight: 400;
  color: var(--color-text);
}

.hi-dot {
  position: relative;
}

.hi-dot::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  width: 0.14em;
  height: 0.14em;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.hero-title {
  font-family: "MalayalamMN", "Malayalam MN", "MalayalamMN-Regular", "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 7.5vw, 5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
}

.hero-title-line,
.hero-title-name {
  display: block;
}

.hero-title-name {
  margin-top: -23px;
  margin-left: 1px;
}

/* Main content area - two columns */
.hero-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: end;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 600px;
  position: relative;
  justify-self: start;
}

.hero-subtitle {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-6);
  text-align: left;
}

.hero-description p {
  margin-bottom: var(--space-4);
}

.hero-description p:last-child {
  margin-bottom: 0;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
  margin-bottom: 30px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-label .dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: var(--radius-full);
  animation: pulse 2s ease-in-out infinite;
}

/* Hero image */
.hero-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-blob {
    width: 300px;
    height: 300px;
    left: 50px;
  }

  .hero-main {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  .hero-image {
    justify-self: end;
  }
}

@media (min-width: 1024px) {
  .hero-blob {
    width: 340px;
    height: 340px;
    left: calc(50vw - 700px);
  }

  .hero-hi {
    right: 10%;
  }
}

/* -------------------------------------------------------------------------
   About Section
   ------------------------------------------------------------------------- */
.about-content {
  display: grid;
  gap: var(--space-16);
  align-items: start;
}

.about-image {
  position: relative;
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background-color: var(--color-bg-alt);
  box-shadow: var(--shadow-lg);
}

.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  opacity: 0.5;
}

.about-image-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-2xl);
  top: 1.5rem;
  left: 1.5rem;
  z-index: -1;
  opacity: 0.4;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin-bottom: var(--space-8);
  line-height: 1.2;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.8;
  font-size: var(--font-size-lg);
}

.text-highlight {
  background: linear-gradient(120deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 500;
}

.about-text-only {
  max-width: 800px;
  text-align: left;
}

.about-text-only h2 {
  margin-bottom: var(--space-10);
}

.about-text-only p {
  text-align: left;
  max-width: 700px;
}

/* About Split Layout - heading left, content right */
.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.about-split-header {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
  align-self: start;
}

@media (min-width: 768px) {
  .about-split {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-16);
  }
}

.about-split-header .section-label {
  display: block;
  margin-bottom: var(--space-4);
}

.about-split-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.heading-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.heading-link:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.about-split-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.8;
  font-size: var(--font-size-base);
}

.about-split-content p:last-child {
  margin-bottom: 0;
}

.about-text p:last-of-type {
  margin-bottom: var(--space-10);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
}

.stat-item {
  text-align: left;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--font-size-4xl);
  font-weight: 400;
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-20);
  }
}

/* -------------------------------------------------------------------------
   Skills Section
   ------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}

/* Approach Grid - 4 blocks in grid layout */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .approach-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}

.approach-block {
  padding-top: 0;
}

.approach-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.approach-icon svg {
  width: 28px;
  height: 28px;
}

/* Gradient colors for icons */
.approach-block:nth-child(1) .approach-icon svg {
  stroke: url(#gradient-orange);
}

.approach-block:nth-child(2) .approach-icon svg {
  stroke: url(#gradient-purple);
}

.approach-block:nth-child(3) .approach-icon svg {
  stroke: url(#gradient-yellow);
}

.approach-block:nth-child(4) .approach-icon svg {
  stroke: url(#gradient-pink);
}

.approach-block h3 {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-text);
}

.approach-block p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* -------------------------------------------------------------------------
   Portfolio/Projects Section
   ------------------------------------------------------------------------- */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: project-counter;
  overflow: visible;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--color-text);
  transition: all var(--transition-base);
  counter-increment: project-counter;
  overflow: visible;
}

@media (min-width: 1024px) {
  .project-card {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    row-gap: 0;
    column-gap: var(--space-12);
  }

  .project-card .project-header {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-bottom: var(--space-4);
  }

  .project-card .project-content {
    display: contents;
  }

  .project-card .project-visual {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
    align-self: start;
  }

  .project-card .project-text {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 1.5rem;
  }
}

.project-card:first-child {
  padding-top: 0;
}

.project-card:last-child {
  border-bottom: none;
}

/* Linear project card layout - single column with text above gallery */
.project-card-linear {
  display: block;
}

.project-card-linear .project-header {
  margin-bottom: var(--space-8);
}

.project-text-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-8);
  max-width: 800px;
}

.project-visual-full {
  width: 100%;
  position: static;
}

.project-image {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
}

.project-image-wrapper {
  position: relative;
}

.project-image-decoration {
  display: none;
}

/* Interactive Prototype Preview */
.project-image-preview {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.project-image-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background: var(--color-white);
}

.project-image-preview:hover iframe {
  pointer-events: auto;
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 1;
  transition: opacity var(--transition-base);
}

.project-image-overlay span {
  padding: var(--space-3) var(--space-6);
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

.project-image-preview:hover .project-image-overlay {
  opacity: 0;
}

/* Static Image Preview (clickable screenshot that opens prototype) */
.project-image-static {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid #000;
  box-shadow: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-image-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-image-static:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.project-image-static-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-image-static-overlay span {
  padding: var(--space-3) var(--space-6);
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

.project-image-static:hover .project-image-static-overlay {
  opacity: 1;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.02);
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Project Header */
.project-header {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.project-title-row h3 {
  font-family: var(--font-primary);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.project-title-row .project-link {
  flex-shrink: 0;
  margin: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.project-header h3 {
  font-family: var(--font-primary);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 0;
  line-height: 1.2;
}

/* Project Content - Two Column Layout */
.project-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .project-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
  }

  /* Full width layout when screenshot gallery is present */
  .project-content:has(.screenshot-gallery-wrapper) {
    grid-template-columns: 1fr;
  }
}

.project-visual {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
}

/* Remove sticky when full-width gallery */
.project-content:has(.screenshot-gallery-wrapper) .project-visual {
  position: static;
}

/* Stacked layout - images above, text below */
.project-content-stacked {
  grid-template-columns: 1fr !important;
  overflow: visible;
}

.project-content-stacked .project-visual {
  position: static;
  overflow: visible;
  max-width: 100%;
}

.project-content-stacked .screenshot-gallery-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.project-text .project-detail-block {
  padding-bottom: var(--space-6);
}

/* Project Carousel */
.project-carousel {
  position: relative;
}

.project-carousel-track {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-4);
}

.project-carousel-track::-webkit-scrollbar {
  display: none;
}

.project-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.project-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-full);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  background: var(--color-text);
  color: var(--color-white);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-dots {
  display: flex;
  gap: var(--space-2);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  background: var(--color-border);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active,
.carousel-dot:hover {
  background: var(--color-text);
}

/* Project Footer */
.project-footer {
  display: flex;
  gap: var(--space-4);
}

.project-number {
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: 0.05em;
}

.project-number::before {
  content: "0" counter(project-counter);
}

.project-info h3 {
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.project-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
  font-size: var(--font-size-base);
}

.project-links {
  display: flex;
  gap: var(--space-4);
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background-color: transparent;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.project-link:hover {
  background-color: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

.project-link svg {
  width: 1rem;
  height: 1rem;
}

.project-subtitle {
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  margin-bottom: 0;
  line-height: 1.5;
  font-size: var(--font-size-base);
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.project-detail-block {
  padding-bottom: var(--space-6);
}

.project-detail-block:last-child {
  padding-bottom: 0;
}

.project-detail-block h4 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-text);
}

.project-detail-block h4 svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

/* Gradient colors for project detail icons */
.project-detail-block:nth-child(1) h4 svg {
  stroke: url(#gradient-orange);
}

.project-detail-block:nth-child(2) h4 svg {
  stroke: url(#gradient-purple);
}

.project-detail-block:nth-child(3) h4 svg {
  stroke: url(#gradient-yellow);
}

.project-detail-block p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.project-detail-block p:last-child {
  margin-bottom: 0;
}

.project-detail-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-detail-block li {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  padding-left: var(--space-4);
  position: relative;
  margin-bottom: var(--space-2);
}

.project-detail-block li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-text-light);
}

.project-detail-block strong {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

/* Project Templates List */
/* Screenshot text above (for App Templates gallery) */
.screenshot-text-above {
  margin-bottom: var(--space-4);
  text-align: left;
  width: 500px;
}

@media (min-width: 768px) {
  .screenshot-text-above {
    width: 650px;
  }
}

@media (min-width: 1024px) {
  .screenshot-text-above {
    width: 800px;
  }
}

/* Narrower text for mobile screenshots (spans 2 mobile columns) */
.screenshot-item-mobile .screenshot-text-above {
  width: 324px;
}

@media (min-width: 768px) {
  .screenshot-item-mobile .screenshot-text-above {
    width: 414px;
  }
}

@media (min-width: 1024px) {
  .screenshot-item-mobile .screenshot-text-above {
    width: 504px;
  }
}

.screenshot-text-above h5 {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.screenshot-text-above p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Template examples header */
.template-examples-header {
  padding: 0;
  margin-top: var(--space-12);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-examples-header .section-label {
  margin-bottom: 0;
}

/* Align text at top, screenshots at bottom */
.screenshot-gallery-mobile {
  align-items: stretch;
}

.screenshot-gallery-mobile .screenshot-item {
  display: flex;
  flex-direction: column;
}

.screenshot-gallery-mobile .screenshot-item .screenshot-frame,
.screenshot-gallery-mobile .screenshot-item .screenshot-frame-mobile,
.screenshot-gallery-mobile .screenshot-item .screenshot-frame-web {
  margin-top: auto;
}

@media (min-width: 768px) {
  .project-card {
    padding: var(--space-20) 0;
  }

  .project-carousel-slide {
    flex: 0 0 100%;
  }
}

/* -------------------------------------------------------------------------
   About Me Section (Personal)
   ------------------------------------------------------------------------- */
.about-me-content {
  max-width: 800px;
}

.about-me-content p {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.about-me-content p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Contact Section
   ------------------------------------------------------------------------- */
.contact-content {
  display: grid;
  gap: var(--space-16);
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.contact-info > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  font-size: var(--font-size-lg);
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.contact-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  border-radius: var(--radius-xl);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.contact-item-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-item-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contact-item-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item-value {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.contact-form-wrapper {
  padding: var(--space-10);
  background-color: var(--color-bg-elevated);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
    gap: var(--space-20);
  }
}

/* Centered Contact Layout */
.contact-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-8) 0;
}

.contact-centered .section-label {
  margin-bottom: var(--space-4);
}

.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  margin-bottom: var(--space-6);
  line-height: 1.1;
  color: var(--color-text);
}

.contact-subtitle {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  margin-bottom: var(--space-10);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
  width: 100%;
  max-width: 420px;
  margin-top: var(--space-2);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  min-width: 100px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.contact-label svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-value {
  font-size: var(--font-size-base);
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

a.contact-value {
  transition: color var(--transition-base);
}

a.contact-value:hover {
  color: var(--color-accent);
}

/* Email row with copy functionality */
#copyEmailRow {
  cursor: pointer;
}

#copyEmailRow .contact-value {
  transition: color var(--transition-base);
}

#copyEmailRow:hover .contact-value {
  color: var(--color-accent);
}

#copyEmailRow .copy-icon {
  opacity: 0;
  transition: opacity var(--transition-base);
  color: var(--color-text-muted);
}

#copyEmailRow:hover .copy-icon {
  opacity: 1;
  color: var(--color-accent);
}

#copyEmailRow .copied-text {
  display: none;
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

#copyEmailRow.copied .copy-icon {
  display: none;
}

#copyEmailRow.copied .copied-text {
  display: inline;
}

/* CV actions */
.contact-cv-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.contact-cv-actions a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-base);
}

.contact-cv-actions a:hover {
  color: var(--color-accent);
}

.cv-divider {
  color: var(--color-border);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  padding: var(--space-16) 0 var(--space-10);
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  text-align: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 400;
  color: var(--color-text);
}

.footer-logo span {
  color: var(--color-accent);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
}

.footer-nav a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--color-text);
}

.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* -------------------------------------------------------------------------
   Screenshot Gallery (Horizontal Scrolling)
   ------------------------------------------------------------------------- */
.screenshot-gallery-wrapper {
  display: block;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  overflow-x: auto !important;
  overflow-y: hidden;
  padding-bottom: var(--space-4);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.screenshot-gallery-mobile {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-6);
  width: max-content;
}

.screenshot-gallery-wrapper::-webkit-scrollbar {
  height: 8px;
}

.screenshot-gallery-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.screenshot-gallery-wrapper::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 4px;
}

.screenshot-gallery-wrapper::-webkit-scrollbar-thumb:hover {
  background: #666;
}

.screenshot-gallery {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-2);
  width: max-content;
}

.screenshot-item {
  flex-shrink: 0;
  width: 480px;
}

@media (min-width: 768px) {
  .screenshot-item {
    width: 640px;
  }
}

@media (min-width: 1024px) {
  .screenshot-item {
    width: 840px;
  }
}

.screenshot-frame {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.screenshot-frame:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.screenshot-placeholder {
  border: 2px dashed var(--color-border);
}

.screenshot-placeholder svg {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-placeholder span {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Mobile Screenshot Gallery (Portrait orientation) */
.screenshot-item-mobile {
  width: 150px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .screenshot-item-mobile {
    width: 195px;
  }
}

@media (min-width: 1024px) {
  .screenshot-item-mobile {
    width: 240px;
  }
}

.screenshot-frame-mobile {
  position: relative;
  aspect-ratio: 625 / 1309;
  border-radius: 24px;
  box-shadow: 0 0 0 2px #000;
  overflow: hidden;
}

.screenshot-frame-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Disable clicks and hover on all mobile UI section screenshots */
[data-mobile-lightbox] {
  pointer-events: none;
  cursor: default;
}

[data-mobile-lightbox]:hover {
  transform: none !important;
  box-shadow: 0 0 0 2px #000 !important;
}

.screenshot-frame-mobile img.img-scale-fill {
  transform: scale(1.15);
}

/* Web/Desktop Screenshot Frame (Horizontal) - scaled to match content width */
.screenshot-item-web {
  width: 500px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .screenshot-item-web {
    width: 650px;
  }
}

@media (min-width: 1024px) {
  .screenshot-item-web {
    width: 800px;
  }
}

.screenshot-frame-web {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  box-shadow: 0 0 0 2px #000;
  overflow: hidden;
}

.screenshot-frame-web img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.screenshot-frame-web:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
