:root {
  --page-bg: #F6F1E8;
  --page-bg-wash: #EFE7DB;
  --surface: #FFF9F2;
  --surface-alt: #F3ECE2;
  --text-primary: #1F2430;
  --text-secondary: #5F6773;
  --text-muted: #7B8391;
  --border: rgba(31, 36, 48, 0.10);
  --border-strong: rgba(31, 36, 48, 0.16);
  --accent-primary: #C96A3D;
  --accent-primary-hover: #B85C31;
  --accent-soft: #F3DFD3;
  --accent-cool: #4F7C82;
  --accent-cool-soft: #DCE8E7;
  --moss: #7C8A63;
  --clay: #8B5E3C;
  --card-shadow: 0 10px 30px rgba(60, 40, 20, 0.08);
  --elevated-shadow: 0 18px 45px rgba(60, 40, 20, 0.12);
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 249, 242, 0.95), transparent 34%),
    linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-wash) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 14px 0 28px;
}

.brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  color: var(--accent-primary);
  border: 2px solid currentColor;
  border-radius: 6px 6px 12px 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1;
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
}

.brand-mark::before {
  width: 27px;
  height: 27px;
  top: -9px;
  left: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.brand-mark::after {
  width: 9px;
  height: 11px;
  right: 9px;
  bottom: -2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: var(--page-bg);
}

.brand-kicker,
.eyebrow,
.section-kicker,
.project-type {
  margin: 0;
  color: var(--accent-primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-row h1 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.48rem, 2.1vw, 1.82rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(201, 106, 61, 0.48);
  border-radius: 8px;
  color: var(--text-primary);
  background: rgba(255, 249, 242, 0.58);
  font-weight: 650;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.brand-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  background: var(--surface);
}

.hero {
  display: block;
  padding: clamp(26px, 4.8vw, 54px) 0 clamp(18px, 3vw, 30px);
}

.hero-copy {
  width: min(78%, 920px);
  max-width: 920px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(79, 124, 130, 0.22);
  border-radius: 999px;
  color: var(--accent-cool);
  background: rgba(220, 232, 231, 0.55);
  text-transform: none;
  letter-spacing: 0;
}

.hero h2 {
  margin: 14px 0 14px;
  max-width: 19ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.1vw, 3.95rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-text {
  max-width: 690px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button,
.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.card-button:hover {
  transform: translateY(-1px);
}

.button {
  min-height: 42px;
  padding: 0 20px;
}

.button-primary,
.card-button-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-primary-hover));
  box-shadow: 0 12px 26px rgba(201, 106, 61, 0.18);
}

.button-secondary,
.card-button-secondary {
  color: var(--text-primary);
  background: rgba(255, 249, 242, 0.72);
  border: 1px solid var(--border-strong);
}

.section {
  padding: 8px 0 0;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  line-height: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(205px, 0.88fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 218px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 249, 242, 0.82);
  box-shadow: var(--card-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card.has-image {
  grid-column: auto;
  grid-template-columns: minmax(205px, 0.88fr) minmax(0, 1fr);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 106, 61, 0.28);
  box-shadow: var(--elevated-shadow);
}

.project-preview {
  position: relative;
  min-height: 176px;
  height: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-alt);
}

.project-preview.has-real-image,
.project-preview.preview-workspace,
.project-preview.preview-calculator,
.project-preview.preview-kolam,
.project-preview.preview-pattern,
.project-preview.preview-color {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.project-preview.is-screenshot {
  aspect-ratio: auto;
  min-height: 0;
  align-self: start;
  background:
    linear-gradient(180deg, rgba(31, 36, 48, 0.035), rgba(31, 36, 48, 0.015)),
    var(--surface-alt);
}

.project-image-frame {
  width: 100%;
  aspect-ratio: var(--project-preview-aspect, 16 / 9);
  overflow: hidden;
  border-radius: 6px;
  background: #0C1117;
}

.project-placeholder-frame {
  background: var(--surface-alt);
}

.preview-workspace .project-placeholder-frame {
  display: grid;
  grid-template-columns: 54px 1fr 68px;
  gap: 8px;
  padding: 10px;
}

.preview-calculator .project-placeholder-frame {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.preview-kolam .project-placeholder-frame {
  position: relative;
  background:
    radial-gradient(circle, rgba(79, 124, 130, 0.28) 1px, transparent 1px),
    var(--surface-alt);
  background-size: 18px 18px;
}

.preview-pattern .project-placeholder-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(79, 124, 130, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(201, 106, 61, 0.18), transparent 38%),
    var(--surface-alt);
}

.preview-color .project-placeholder-frame {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  padding: 10px;
}

.preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--project-image-fit, cover);
  object-position: var(--project-image-position, center center);
}

.preview-image.is-screenshot {
  object-fit: var(--project-image-fit, contain);
  object-position: var(--project-image-position, center top);
}

.project-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 2px 2px 2px 0;
}

.project-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}

.project-title-wrap {
  display: flex;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.project-icon-box {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.project-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-icon-fallback {
  color: var(--project-accent);
  background: var(--surface-alt);
  font-size: 0.85rem;
  font-weight: 800;
}

.project-heading h3 {
  margin: 2px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.36rem, 1.85vw, 1.72rem);
  line-height: 1.03;
}

.project-type {
  color: var(--project-accent);
  font-size: 0.66rem;
}

.project-tagline {
  margin: 0;
  color: var(--accent-primary);
  font-size: 0.92rem;
  font-weight: 740;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--project-accent);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 750;
}

.project-description {
  margin: 11px 0 0;
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.44;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 650;
}

.project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.card-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.about-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 249, 242, 0.74);
  box-shadow: var(--card-shadow);
}

.about-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 8px 20px;
  border-right: 1px solid var(--border-strong);
}

.about-card:last-child {
  border-right: 0;
}

.about-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent-primary);
  background: var(--accent-soft);
  border: 1px solid rgba(201, 106, 61, 0.16);
  font-size: 1.35rem;
}

.about-card:nth-child(2) .about-icon {
  color: var(--accent-cool);
  background: var(--accent-cool-soft);
}

.about-card:nth-child(3) .about-icon {
  color: var(--moss);
  background: rgba(124, 138, 99, 0.14);
}

.about-card h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.about-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.42;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-cool);
  font-weight: 750;
}

.preview-workspace {
  display: grid;
  grid-template-columns: 70px 1fr 88px;
  gap: 10px;
  padding: 12px;
}

.workspace-sidebar,
.workspace-panel,
.workspace-result {
  border-radius: 6px;
}

.workspace-sidebar {
  background: linear-gradient(180deg, #18343B, #11252A);
}

.workspace-panel,
.workspace-result {
  padding: 12px;
  background: rgba(255, 249, 242, 0.72);
  border: 1px solid var(--border);
}

.workspace-panel span,
.workspace-panel p,
.workspace-result span,
.workspace-result p {
  display: block;
  height: 9px;
  margin: 0 0 9px;
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.12);
}

.workspace-panel strong {
  display: block;
  margin: 8px 0 16px;
  color: var(--text-primary);
  font-size: 0.72rem;
}

.preview-calculator {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 20px;
}

.calc-lines span {
  display: block;
  height: 16px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(124, 138, 99, 0.18);
}

.calc-lines span:nth-child(2) {
  width: 78%;
}

.calc-lines span:nth-child(3) {
  width: 58%;
}

.calc-total {
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 138, 99, 0.72), rgba(201, 106, 61, 0.18));
}

.calc-bars {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.55fr;
  gap: 8px;
  align-items: end;
  height: 52px;
}

.calc-bars span {
  border-radius: 6px 6px 0 0;
  background: var(--project-accent);
}

.calc-bars span:nth-child(2) {
  height: 72%;
  opacity: 0.65;
}

.calc-bars span:nth-child(3) {
  height: 48%;
  opacity: 0.42;
}

.preview-kolam {
  background:
    radial-gradient(circle, rgba(79, 124, 130, 0.28) 1px, transparent 1px),
    var(--surface-alt);
  background-size: 18px 18px;
}

.kolam-line {
  position: absolute;
  inset: 50%;
  width: 132px;
  height: 132px;
  border: 3px solid var(--accent-cool);
  transform-origin: center;
}

.line-one {
  transform: translate(-50%, -50%) rotate(45deg);
}

.line-two {
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%) rotate(0deg);
}

.line-three {
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.line-four {
  width: 174px;
  height: 2px;
  border: 0;
  background: var(--accent-cool);
  transform: translate(-50%, -50%) rotate(45deg);
}

.preview-pattern {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(79, 124, 130, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(201, 106, 61, 0.18), transparent 38%),
    var(--surface-alt);
}

.pattern-word {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: transparent;
  background: linear-gradient(90deg, var(--accent-cool), var(--accent-primary), var(--clay));
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  line-height: 0.9;
}

.preview-color {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  padding: 10px;
}

.color-photo {
  border-radius: 7px;
  background:
    linear-gradient(155deg, rgba(31, 36, 48, 0.22), transparent 48%),
    linear-gradient(25deg, #5E7D86 0 30%, #C9A278 30% 58%, #E9E6DF 58% 100%);
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  height: 42px;
}

.color-swatches span {
  border-radius: 5px;
}

.color-swatches span:nth-child(1) {
  background: #2E4F5C;
}

.color-swatches span:nth-child(2) {
  background: #5E7D86;
}

.color-swatches span:nth-child(3) {
  background: #C9A278;
}

.color-swatches span:nth-child(4) {
  background: #E9E6DF;
}

@media (max-width: 1120px) {
  .hero-copy {
    width: min(90%, 860px);
  }

  .project-card,
  .project-card.has-image {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .project-content {
    padding: 0;
  }
}

@media (max-width: 860px) {
  .projects-grid,
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 8px;
  }

  .about-card:last-child {
    border-bottom: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 28px), var(--max-width));
    padding-top: 14px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero h2 {
    max-width: 100%;
    font-size: clamp(2.18rem, 10vw, 3.15rem);
  }

  .project-card {
    min-height: 0;
  }

  .project-preview {
    min-height: 176px;
  }

  .project-preview.is-screenshot {
    aspect-ratio: 16 / 9;
    min-height: 0;
    height: auto;
  }

  .project-heading {
    display: block;
  }

  .project-title-wrap {
    margin-bottom: 10px;
  }

  .status-badge {
    display: inline-flex;
    margin-top: 10px;
  }

  .project-actions {
    grid-template-columns: 1fr;
  }

  .preview-workspace {
    grid-template-columns: 54px 1fr;
  }

  .workspace-result {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-row {
    grid-template-columns: auto 1fr;
  }

  .brand-link {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
