/* ==========================================
   ROOT
========================================== */
:root {
  --bg: #f4ede4;
  --tile: #ffffff;
  --ink: #1a1008;
  --dim: #6b5540;
  --acc: #8b6547;
  --acc-deep: #6f4d33;
  --acc-soft: #f0e0cf;
  --line: rgba(139,101,71,0.14);
  --grid: rgba(139,101,71,0.065);
  --glow: rgba(139,101,71,0.11);
}

/* ==========================================
   RESET
========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================
   ANIMATIONS
========================================== */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   GLOBAL
========================================== */
body {
  font-family: "Georgia", serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  min-height: 100vh;
}

/* ==========================================
   LAYOUT
========================================== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 180px;
  flex-shrink: 0;
  padding: 52px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  flex: 1;
  padding: 52px 56px 80px;
  min-width: 0;
  animation: zoomIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fadeUp 0.35s ease both;
}

/* ==========================================
   NAVIGATION
========================================== */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.sidebar-nav a {
  display: block;
  font-size: 12px;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  padding: 7px 0 7px 10px;
  text-align: left;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: var(--acc);
}

.sidebar-nav a.active {
  color: var(--acc);
  border-left-color: var(--acc);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-links a {
  font-size: 11px;
  color: var(--dim);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sidebar-links a:hover {
  color: var(--acc);
}

/* ==========================================
   HOME
========================================== */
.home-text p {
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 14px;
  max-width: 620px;
}

.home-text p.dim {
  font-size: 15px;
  color: var(--dim);
  font-family: system-ui, sans-serif;
  line-height: 1.8;
  margin-bottom: 0;
}

.home-links {
  display: flex;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.home-links a {
  font-size: 13px;
  color: var(--acc);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  border-bottom: 1px solid rgba(139,101,71,0.35);
  padding-bottom: 1px;
}

.home-links a:hover {
  border-bottom-color: var(--acc);
}

.below-bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.col-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: system-ui, sans-serif;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.see-all {
  font-size: 12px;
  color: var(--dim);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px 0 0;
  display: block;
  letter-spacing: 0.04em;
}

.see-all:hover {
  color: var(--acc);
}

/* ==========================================
   PAGE HEADER
========================================== */
.page-header {
  position: relative;
  margin-bottom: 28px;
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(139,101,71,0.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.56));
  box-shadow: 0 18px 45px rgba(139,101,71,0.06);
  overflow: hidden;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: auto -40px -52px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(139,101,71,0.08);
  filter: blur(4px);
}

.page-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 0.95;
  margin-bottom: 12px;
}

.page-header p {
  max-width: 680px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--dim);
  font-family: system-ui, sans-serif;
}

/* ==========================================
   MINI PROJECTS
========================================== */
.mini-proj {
  padding: 14px 14px 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.82));
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  box-shadow: 0 10px 24px rgba(139,101,71,0.05);
}

.mini-proj:hover {
  box-shadow: 0 16px 28px rgba(139,101,71,0.1);
  transform: translateY(-3px);
  border-color: rgba(139,101,71,0.24);
}

.mini-proj h4 {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 7px;
  line-height: 1.35;
}

.mini-proj p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--dim);
  font-family: system-ui, sans-serif;
  margin-bottom: 10px;
}

.mini-proj-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-proj-links a {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--acc);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  border: 1px solid rgba(139,101,71,0.16);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255,255,255,0.75);
}

.mini-proj-links a:hover {
  border-color: rgba(139,101,71,0.3);
}

/* ==========================================
   MINI BLOGS
========================================== */
.mini-blog {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 14px 14px 13px;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.82));
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  box-shadow: 0 10px 24px rgba(139,101,71,0.05);
}

.mini-blog:hover {
  box-shadow: 0 16px 28px rgba(139,101,71,0.1);
  transform: translateY(-3px);
  border-color: rgba(139,101,71,0.24);
}

.mini-blog span {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}

.mini-blog a {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--acc);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  white-space: nowrap;
  border: 1px solid rgba(139,101,71,0.16);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255,255,255,0.75);
}

.mini-blog a:hover {
  border-color: rgba(139,101,71,0.3);
}

/* ==========================================
   PROJECT PAGE
========================================== */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.proj-tile {
  position: relative;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  overflow: hidden;
}

.proj-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(139,101,71,0.92), rgba(166,124,82,0.3));
  opacity: 0;
  transition: opacity 0.2s;
}

.proj-tile:hover {
  box-shadow: 0 16px 30px rgba(139,101,71,0.12);
  transform: translateY(-4px);
  border-color: rgba(139,101,71,0.26);
}

.proj-tile:hover::before {
  opacity: 1;
}

.proj-tile h3 {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 10px;
}

.proj-tile p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--dim);
  font-family: system-ui, sans-serif;
  margin-bottom: 15px;
}

.proj-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--acc);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  border: 1px solid rgba(139,101,71,0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.72);
}

.proj-links a:hover {
  border-color: rgba(139,101,71,0.36);
  background: rgba(240,224,207,0.7);
}

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

.blog-tile {
  position: relative;
  min-height: 220px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72)),
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 12px,
      rgba(139,101,71,0.022) 12px,
      rgba(139,101,71,0.022) 24px
    );
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.blog-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(139,101,71,0.1);
  border-color: rgba(139,101,71,0.24);
}

.blog-tile h3 {
  font-size: 22px;
  line-height: 1.22;
  font-weight: 400;
  margin-bottom: 12px;
}

.blog-tile p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--dim);
  font-family: system-ui, sans-serif;
  margin-bottom: 18px;
}

/* ==========================================
   FOOTER
========================================== */
.colophon {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.colophon p {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 6px;
  font-family: system-ui, sans-serif;
}

.colophon a {
  font-size: 15px;
  color: var(--acc);
  text-decoration: none;
  font-style: italic;
}

.colophon a:hover {
  text-decoration: underline;
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }

  .sidebar-nav {
    flex-direction: row;
    margin-bottom: 0;
    gap: 0;
  }

  .sidebar-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding-left: 0;
    margin-right: 16px;
  }

  .sidebar-nav a.active {
    border-bottom-color: var(--acc);
  }

  .sidebar-links {
    flex-direction: row;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    gap: 12px;
  }

  .main {
    padding: 32px 24px 60px;
  }

  .page-header {
    padding: 22px 18px 20px;
  }

  .page-header h2 {
    font-size: 30px;
  }

  .proj-grid,
  .below-bio,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-tile {
    min-height: auto;
  }
}
