/* -------------------------------------------------------------
 * Custom Stylesheet for firmianis.com (錦上青梧)
 * Aesthetic: Zen & Industrial (Conflict Aesthetic)
 * Core Theme: Warm Rice Paper Canvas (#F5F2EB) vs. Rich Slate Ink (#2B2B2B)
 * Accent Colors: Brand Teal (#4C8B99) and Brand Moss Green (#6E9C85)
 * ------------------------------------------------------------- */

/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500&family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Outfit:wght@200;300;400;500;600&display=swap');

:root {
  /* Color System */
  --canvas: #F5F2EB;
  /* Warm Rice Paper Base */
  --ink: #1E232A;
  /* Slate Ink Dark */
  --ink-rgb: 30, 35, 42;
  --accent: #4C8B99;
  /* Brand Teal (CMYK 70, 30, 25, 0) */
  --accent-rgb: 76, 139, 153;
  --mint: #6E9C85;
  /* Moss Green (CMYK 65, 5, 50, 0) */
  --steel: #8E9A9D;
  /* Slate Steel Gray */
  --white: #FFFFFF;
  --grid-line: rgba(30, 35, 42, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);

  /* Fonts */
  --font-serif-zh: 'Noto Serif TC', 'Playfair Display', serif;
  --font-sans-zh: 'Noto Sans TC', 'Outfit', sans-serif;
  --font-serif-en: 'Playfair Display', serif;
  --font-sans-en: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans-zh);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  /* Grain Texture Overlay */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--steel);
  border-radius: 4px;
}

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

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--white);
}

/* Grid & Border Layout lines (Industrial look) */
.industrial-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  opacity: 0.3;
}

.industrial-grid-col {
  border-right: 1px dashed var(--grid-line);
}

.industrial-grid-col:last-child {
  border-right: none;
}

@media (min-width: 768px) {
  .industrial-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif-zh);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.25em;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

/* Main Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 3rem;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.4s ease, border-bottom 0.4s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background-color: rgba(245, 242, 235, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grid-line);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .navbar-container {
    padding: 1.5rem 3rem;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif-zh);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.nav-brand img {
  height: 2.2rem;
  width: auto;
  border-radius: 4px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-sans-zh);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

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

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

.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.lang-switch:hover {
  background: var(--ink);
  color: var(--canvas);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  transform: scale(0);
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--canvas);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-menu-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mobile-menu-link {
  font-family: var(--font-serif-zh);
  font-size: 1.75rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.3s ease;
}

.mobile-menu-link:hover {
  color: var(--accent);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--grid-line);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 992px) {
  .hero-content {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-text {
  z-index: 10;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.hero-subtitle::before {
  content: "— ";
  color: var(--accent);
  margin-right: 0.5rem;
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
    line-height: 1.4;
  }
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(30, 35, 42, 0.7);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-family: var(--font-sans-zh);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 0;
}

.btn-primary {
  background-color: var(--ink);
  color: var(--canvas);
  border: 1px solid var(--ink);
}

.btn-primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid rgba(30, 35, 42, 0.3);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background-color: rgba(30, 35, 42, 0.05);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Slogan Graphic */
.slogan-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grid-line);
  background: rgba(255, 255, 255, 0.4);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 320px;
}

@media (min-width: 768px) {
  .slogan-graphic {
    padding: 4rem 3rem;
    max-width: none;
    width: auto;
  }
}

.slogan-graphic-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.slogan-vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-serif-zh);
  font-size: 2.5rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--ink);
}

.slogan-vertical.accented {
  color: var(--accent);
}

.slogan-border {
  height: 15rem;
  width: 1px;
  background-color: var(--grid-line);
  margin-top: 1rem;
}

/* Sections Base */
.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--grid-line);
  position: relative;
}

@media (min-width: 992px) {
  .section {
    padding: 8rem 0;
  }
}

.section-head {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4rem;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
  }
}

.section-title {
  font-size: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background-color: var(--accent);
}

.section-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

/* About Philosophy */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}

@media (min-width: 992px) {
  .philosophy-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.philosophy-quote {
  font-family: var(--font-serif-zh);
  font-size: 1.75rem;
  line-height: 1.5;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

.philosophy-desc {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.05rem;
  color: rgba(30, 35, 42, 0.8);
}

.philosophy-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 576px) {
  .philosophy-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .philosophy-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.philosophy-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--grid-line);
  padding: 2rem 1.5rem;
  transition: all 0.4s ease;
}

.philosophy-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.philosophy-card-icon {
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.philosophy-card-title {
  font-family: var(--font-sans-zh);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.philosophy-card-text {
  font-size: 0.85rem;
  color: rgba(30, 35, 42, 0.65);
}

/* Portfolio Filters */
.portfolio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--grid-line);
  padding-bottom: 1rem;
}

.portfolio-tab {
  background: transparent;
  border: none;
  font-family: var(--font-sans-zh);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--steel);
  position: relative;
  transition: color 0.3s;
}

.portfolio-tab::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s;
}

.portfolio-tab.active {
  color: var(--ink);
  font-weight: 500;
}

.portfolio-tab.active::after {
  width: 100%;
}

/* Showcase Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* Hide inactive portfolio category blocks */
.portfolio-category-block {
  display: none;
}

.portfolio-category-block.active {
  display: block;
}

/* Software Project Cards */
.software-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 992px) {
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.software-card {
  background: var(--white);
  border: 1px solid var(--grid-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.software-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.software-img-wrapper {
  position: relative;
  height: 260px;
  background: #EAE8E3;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.software-card:hover .software-img {
  transform: scale(1.05);
}

.software-img {
  width: 100%;
  height: 100%;
  object-cover: cover;
  transition: transform 0.6s ease;
  filter: grayscale(20%) contrast(1.02);
}

.software-system-viz {
  width: 100%;
  height: 100%;
  padding: 2rem;
  stroke: var(--ink);
  opacity: 0.75;
}

.software-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.software-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.software-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(76, 139, 153, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
}

.software-title {
  font-family: var(--font-serif-zh);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.software-desc {
  font-size: 0.85rem;
  color: rgba(30, 35, 42, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.software-link {
  text-decoration: none;
  font-family: var(--font-sans-zh);
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  transition: color 0.3s;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
}

.software-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Photography Grid */
.photo-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.photo-subtab {
  background: rgba(30, 35, 42, 0.04);
  border: 1px solid transparent;
  font-family: var(--font-sans-zh);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
  color: var(--steel);
  transition: all 0.3s;
}

.photo-subtab:hover {
  background: rgba(30, 35, 42, 0.08);
}

.photo-subtab.active {
  background: var(--ink);
  color: var(--canvas);
  font-weight: 400;
}

.photo-sub-block {
  display: none;
}

.photo-sub-block.active {
  display: block;
}

.photo-masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .photo-masonry {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 992px) {
  .photo-masonry {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.photo-item {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grid-line);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(0.95);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.photo-item:hover .photo-img {
  filter: grayscale(0%) contrast(1.02);
  transform: scale(1.03);
}

.photo-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 1.2rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.photo-item:hover .photo-meta {
  opacity: 1;
  transform: translateY(0);
}

.photo-title {
  font-family: var(--font-serif-zh);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--white);
}

.photo-exif {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.8;
  color: #D1D5DB;
}

/* Photo Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 20, 0.96);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-title {
  font-family: var(--font-serif-zh);
  color: var(--white);
  margin-top: 1rem;
  font-size: 1.1rem;
}

.lightbox-exif {
  font-family: var(--font-mono);
  color: #9CA3AF;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: opacity 0.3s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  padding: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: -4rem;
}

.lightbox-next {
  right: -4rem;
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
  }

  .lightbox-next {
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
  }
}

/* T-shirt Showcase Grid */
.tshirt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 576px) {
  .tshirt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .tshirt-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .tshirt-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tshirt-card {
  background: var(--white);
  border: 1px solid var(--grid-line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

.tshirt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tshirt-img-container {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #F8F6F2;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tshirt-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tshirt-img.tshirt-back {
  position: absolute;
  opacity: 0;
}

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

.tshirt-view-toggle {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--grid-line);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.tshirt-view-toggle:hover {
  background: var(--ink);
  color: var(--canvas);
}

.tshirt-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tshirt-brand {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--steel);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.tshirt-title {
  font-family: var(--font-serif-zh);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.tshirt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(30, 35, 42, 0.65);
  border-top: 1px dashed var(--grid-line);
  padding-top: 0.75rem;
  margin-top: auto;
}

.tshirt-colors {
  display: flex;
  gap: 0.35rem;
}

.tshirt-color-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Contact & Quote Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-detail-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
}

.contact-detail-value {
  font-size: 1.1rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
}

.contact-detail-value a {
  text-decoration: none;
  color: var(--ink);
  transition: color 0.3s;
}

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

.contact-card {
  background: var(--white);
  border: 1px solid var(--grid-line);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

@media (min-width: 768px) {
  .contact-card {
    padding: 3.5rem;
  }
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-family: var(--font-sans-zh);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: rgba(30, 35, 42, 0.02);
  border: 1px solid rgba(30, 35, 42, 0.15);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans-zh);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: all 0.3s;
  border-radius: 0;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(76, 139, 153, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Success Dialog / Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 20, 0.7);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border: 1px solid var(--grid-line);
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
}

.modal-title {
  font-family: var(--font-serif-zh);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

.modal-text {
  font-size: 0.9rem;
  color: rgba(30, 35, 42, 0.7);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.modal-close-btn {
  padding: 0.6rem 2rem;
  background-color: var(--ink);
  color: var(--canvas);
  border: none;
  font-family: var(--font-sans-zh);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s;
}

.modal-close-btn:hover {
  background-color: var(--accent);
}

/* Footer */
.footer {
  background-color: var(--ink);
  color: var(--canvas);
  padding: 5rem 0 3rem 0;
  font-family: var(--font-sans-zh);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif-zh);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--canvas);
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 2.5rem;
  width: auto;
  border-radius: 4px;
}

.footer-desc {
  font-size: 0.85rem;
  color: rgba(245, 242, 235, 0.6);
  max-width: 320px;
}

.footer-nav-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.footer-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav-link {
  text-decoration: none;
  color: rgba(245, 242, 235, 0.7);
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-nav-link:hover {
  color: var(--canvas);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 242, 235, 0.1);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: rgba(245, 242, 235, 0.4);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-family: var(--font-mono);
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
}

.footer-social-link {
  text-decoration: none;
  color: rgba(245, 242, 235, 0.4);
  transition: color 0.3s;
}

.footer-social-link:hover {
  color: var(--canvas);
}