/* =============================================
   CSS CUSTOM PROPERTIES — Light & Dark
   ============================================= */
:root {
  --bg:                    #ffffff;
  --text-primary:          #1a1916;
  --text-secondary:        #6b6b6b;
  --text-muted:            #7a776f;
  --text-body:             #000000;
  --accent:                #c84b2f;
  --border-light:          #ddd9d1;
  --nav-border:            rgba(0, 0, 0, 0.12);
  --divider:               rgba(0, 0, 0, 0.2);
  --nav-bg-scrolled:       rgba(255, 255, 255, 0.75);
  --nav-blur:              blur(16px);
}

html.dark {
  --bg:                    #111009;
  --text-primary:          #e6e0d4;
  --text-secondary:        #8a8680;
  --text-muted:            #6e6a63;
  --text-body:             #d9d3c8;
  --accent:                #e0603f;
  --border-light:          #2b2824;
  --nav-border:            rgba(255, 255, 255, 0.08);
  --divider:               rgba(255, 255, 255, 0.12);
  --nav-bg-scrolled:       rgba(17, 16, 9, 0.75);
  --nav-blur:              blur(16px);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Wix Madefor Display', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img {
  display: block;
  max-width: 100%;
}

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

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg-scrolled);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  transition:
    background 0.35s ease,
    backdrop-filter 0.35s ease,
    -webkit-backdrop-filter 0.35s ease;
}


.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 120px;
  width: 100%;
}

.nav-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.4s ease;
}


/* Right side grouping: time + toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-time {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 24px;
}

.time-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.42px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.4s ease;
}

.time-divider {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--border-light);
  transition: color 0.4s ease;
}

.time-value {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.45px;
  color: var(--text-primary);
  transition: color 0.4s ease;
}

/* =============================================
   THEME TOGGLE — icon-only, no bg, no stroke
   ============================================= */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.25s ease, transform 0.2s ease;
  outline: none;
  line-height: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
  transform: rotate(12deg) scale(1.1);
}

/* Show moon in light mode, sun in dark mode */
.icon-sun  { display: none; }
.icon-moon { display: block; }

html.dark .icon-sun  { display: block; }
html.dark .icon-moon { display: none; }


/* =============================================
   MAIN LAYOUT
   ============================================= */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 120px;
  padding-right: 120px;
  padding-top: 100px;
  padding-bottom: 100px;
  gap: 40px;
}

/* =============================================
   SECTIONS — shared two-column layout
   ============================================= */
.section {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

/* About section has extra top/bottom breathing room */
.about-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Label column */
.section-label-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex-shrink: 0;
  width: 280px;
  padding-right: 60px;
  /* Sticky: travels with its own section, stops when section exits */
  position: sticky;
  top: 100px; /* nav height + breathing room */
  align-self: flex-start;
}

/* Top offset for sections sitting next to a list */
.section-label-col.pt-top {
  padding-top: 40px;
}

/* Disable sticky on mobile */
@media (max-width: 768px) {
  .section-label-col {
    position: static;
  }
}

.section-label {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: -1.2px;
  color: var(--accent);
  transition: color 0.4s ease;
}

/* Content column */
.section-content {
  flex: 1;
  min-width: 0;
}

/* =============================================
   DIVIDER
   ============================================= */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--divider);
  flex-shrink: 0;
  transition: background-color 0.4s ease;
}

/* =============================================
   ABOUT
   ============================================= */
.about-text {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  opacity: 0.8;
  max-width: 674px;
  transition: color 0.4s ease;
}

.about-text p + p {
  margin-top: 16px;
}

.about-link {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.about-link:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

/* =============================================
   WORK
   ============================================= */
.work-section {
  padding-top: 60px;
  padding-bottom: 0;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
  width: 100%;
  cursor: pointer;
}

.work-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.work-title {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.work-desc {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 27.5px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  opacity: 0.8;
  transition: color 0.4s ease;
}

.work-year {
  font-family: 'Wix Madefor Text', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.03em;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.4s ease;
}

.work-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.work-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

/* =============================================
   WRITINGS
   ============================================= */
.writings-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.writing-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  cursor: pointer;
}

.writing-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.writing-title {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.writing-subtitle {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 27.5px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  opacity: 0.8;
  transition: color 0.4s ease;
}

.writing-date {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24.75px;
  letter-spacing: -0.03em;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 100px;
  text-align: right;
  transition: color 0.4s ease;
}

/* =============================================
   SEE ALL LINK
   ============================================= */
.see-all-link {
  align-self: flex-start;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.see-all-link:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

/* =============================================
   NOTES
   ============================================= */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  cursor: pointer;
}

.note-info {
  flex: 1;
  min-width: 0;
}

.note-title {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.note-date {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24.75px;
  letter-spacing: -0.03em;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 100px;
  text-align: right;
  transition: color 0.4s ease;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  cursor: pointer;
}

.contact-handle {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  transition: color 0.2s ease;
}

.contact-platform {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24.75px;
  letter-spacing: -0.03em;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 100px;
  text-align: right;
  transition: color 0.4s ease;
}

/* =============================================
   MESSAGE STRIP
   ============================================= */
.message-strip {
  width: 100%;
  padding: 60px 0;
}

.message-inner {
  width: 60%;
  margin: 0 auto;
  border: 1px solid var(--border-light);
  transition: border-color 0.2s ease;
}

.message-inner:focus-within {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}

.message-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 60px;
}

.message-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  caret-color: var(--accent);
  transition: color 0.4s ease;
}

.message-input::placeholder {
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.message-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.message-arrow {
  font-size: 15px;
  font-family: 'Wix Madefor Display', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-block;
  transition: color 0.2s ease;
}

.message-btn:hover .message-arrow {
  color: var(--accent);
}

.message-form:focus-within .message-btn .message-arrow {
  color: var(--text-secondary);
}

.message-thankyou {
  text-align: center;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 120px;
  padding-right: 120px;
  width: 100%;
}

.footer-copy {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.03em;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.03em;
  color: var(--text-muted);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.footer-link:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

/* =============================================
   HOVER EFFECTS
   ============================================= */
.writing-item:hover .writing-title,
.note-item:hover .note-title,
.contact-item:hover .contact-handle {
  color: var(--accent);
}

.work-item:hover .work-title {
  color: var(--accent);
}

.work-item:hover .work-image img {
  transform: scale(1.025);
}


/* =============================================
   WRITINGS INDEX PAGE
   ============================================= */
.writings-index-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 140px 24px 100px;
}

.writings-index-list {
  display: flex;
  flex-direction: column;
}

.writings-index-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 0;
}

.writings-index-date {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.writings-index-item-title {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.writings-index-item-subtitle {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  transition: color 0.4s ease;
}

.writings-index-item:hover .writings-index-item-title {
  color: var(--accent);
}

/* =============================================
   ARTICLE / WRITING PAGE
   ============================================= */
.article-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 140px 24px 100px;
}

.article-back {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 48px;
  transition: color 0.2s ease;
}

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

.article-title {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: color 0.4s ease;
}

.article-subtitle {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: color 0.4s ease;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.article-meta-sep {
  opacity: 0.4;
}

.article-live-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.article-live-link:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.article-live-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.article-live-link:hover .article-live-arrow {
  transform: rotate(-45deg);
}

.article-divider {
  width: 100%;
  height: 1px;
  background-color: var(--divider);
  margin: 40px 0;
  transition: background-color 0.4s ease;
}

.article-body {
  font-family: 'Wix Madefor Text', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -0.01em;
  color: var(--text-body);
  transition: color 0.4s ease;
}

.article-body p + p {
  margin-top: 24px;
}

.article-body h2 {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-top: 56px;
  margin-bottom: 16px;
  transition: color 0.4s ease;
}

.article-body h3 {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
  transition: color 0.4s ease;
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 40px 0;
  font-size: 20px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.65;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.article-body a {
  color: inherit;
  font-weight: 500;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.article-body a:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

.article-body figure {
  margin: 48px 0;
}

.article-body figure img {
  width: 100%;
  border-radius: 6px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25em;
  margin: 16px 0;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body figcaption {
  text-align: center;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  transition: color 0.4s ease;
}

/* =============================================
   RESPONSIVE — Tablet
   ============================================= */
@media (max-width: 1100px) {
  .nav-inner {
    padding-left: 60px;
    padding-right: 60px;
  }

  .message-inner {
    width: 68%;
  }

  .main {
    padding-left: 60px;
    padding-right: 60px;
    gap: 40px;
  }

  .footer-inner {
    padding-left: 60px;
    padding-right: 60px;
  }

  .section-label-col {
    width: 220px;
  }
}

/* =============================================
   RESPONSIVE — Mobile
   ============================================= */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .nav-inner {
    padding: 20px 24px;
  }

  .message-inner {
    width: calc(100% - 48px);
    margin: 0 24px;
  }

  .message-strip {
    padding: 40px 0;
  }

  .nav-time {
    gap: 6px;
  }

  .time-label {
    font-size: 12px;
  }

  .time-value {
    font-size: 13px;
  }

  .main {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 76px;
    gap: 32px;
  }

  .section {
    flex-direction: column;
    gap: 24px;
  }

  .about-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .work-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .writings-list,
  .notes-list,
  .contact-list {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .section-label-col {
    width: 100%;
    padding-right: 0;
    padding-top: 0 !important;
    position: static;
  }

  .work-header {
    flex-direction: column;
    gap: 8px;
  }

  .work-list {
    gap: 16px;
  }

  .writings-list {
    gap: 20px;
  }

  .notes-list,
  .contact-list {
    gap: 12px;
  }

  .work-item {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .work-year {
    order: -1;
  }


  .footer-inner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding-left: 24px;
    padding-right: 24px;
  }

  .writing-item,
  .note-item,
  .contact-item {
    flex-direction: column;
    gap: 8px;
  }

  .writing-date,
  .note-date,
  .contact-platform {
    width: auto;
    text-align: left;
    order: -1;
  }

  .nav-section {
    display: none;
  }

  /* --- Font scaling --- */
  .section-label {
    font-size: 22px;
    line-height: 32px;
  }

  .work-year {
    font-size: 13px;
  }

  .writing-date,
  .note-date,
  .contact-platform {
    font-size: 13px;
  }
}
