/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: 'Clarity City';
  src: url('assets/fonts/Clarity City/ClarityCity-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clarity City';
  src: url('assets/fonts/Clarity City/ClarityCity-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
  color-scheme: dark light;

  --color-bg: #000000;
  --color-text: #cccccc;
  --color-accent: #fbff28;
  --color-border: rgba(204, 204, 204, 0.2);

  --font-body: 'Clarity City', -apple-system, sans-serif;
  --font-nav: 'Barlow Condensed', sans-serif;
  --font-handwritten: 'Delicious Handrawn', cursive;

  --sidebar-width: clamp(320px, 40vw, 770px);
  --sidebar-padding: clamp(40px, 13vw, 250px);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #CCCCCC;
    --color-text: #0E0E0E;
    --color-accent: #048995;
    --color-border: rgba(0, 0, 0, 0.2);
  }

  .hero-text h1 {
    text-shadow: 0 0 20px rgba(204, 204, 204, 0.8);
  }
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
}

body {
  max-width: 1920px;
  margin: 0 auto;
  color: var(--color-text);
  font-family: var(--font-body);
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow-x: visible;
  overflow-y: clip;
}

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

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

h1, h2, h3, p {
  margin: 0;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 60px 40px 60px var(--sidebar-padding);
  position: relative;
  z-index: 10;
}

.logo {
  display: block;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.logo svg {
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.logo:hover svg {
  opacity: 0.7;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navigation {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.nav-item {
  display: block;
  position: relative;
  width: fit-content;
  height: 64px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.nav-text {
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: clamp(40px, 3.33vw, 64px);
  line-height: 64px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  display: block;
  transition: opacity 0.4s ease;
}

.nav-strike {
  position: absolute;
  top: 50%;
  left: -2px;
  width: calc(100% + 4px);
  height: 4px;
  background: var(--color-accent);
  transform: translateY(calc(-50% + 3px));
  transition: scale 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  transform-origin: left center;
  scale: 0 1;
}

.nav-item.active .nav-text {
  opacity: 0.3;
}

.nav-item.active .nav-strike {
  scale: 1 1;
}

.nav-item:not(.active):hover .nav-text {
  opacity: 0.3;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

#main-content {
  flex: 1;
  position: relative;
  overflow-x: visible;
  overflow-y: clip;
}

.section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  overflow-x: visible;
  overflow-y: clip;
  transform: translateY(100%);
  transition: transform 0.7s ease-in-out;
  pointer-events: none;
  z-index: 0;
}

.section.active {
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
}

.section.no-transition {
  transition: none;
}

.section.above {
  transform: translateY(-100%);
}

/* ==========================================================================
   Home Section
   ========================================================================== */

.hero-image {
  position: absolute;
  bottom: 3.1%;
  right: 0;
  width: 67%;
  height: 78%;
  overflow: hidden;
}

.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-text {
  position: absolute;
  bottom: 15%;
  left: 10%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 580px;
  z-index: 2;
}

.hero-text h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(80px, 7.8vw, 150px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-text);
}

.hero-subtitle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
  max-width: 460px;
}

.hero-subtitle h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 32px;
}

.hero-subtitle p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(14px, 0.83vw, 16px);
  line-height: 1.5;
}

/* Annotations (doge-style) */
.annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.annotation {
  position: absolute;
  font-family: var(--font-handwritten);
  font-size: clamp(22px, 1.67vw, 32px);
  color: var(--color-accent);
  letter-spacing: -0.03em;
  white-space: nowrap;
  opacity: 0;
  scale: 0.6;
  transform: rotate(var(--rotation, 0deg));
  transition: opacity 0.4s ease, scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.annotation.visible {
  opacity: 1;
  scale: 1;
}

.work-number {
  position: relative;
}

.work-annotation {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  max-width: 740px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(32px, 3.33vw, 64px);
  line-height: 1;
}

.about-content p {
  line-height: 1;
}

.about-content p + p {
  margin-top: 1em;
}

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

/* ==========================================================================
   Work Section
   ========================================================================== */

#work {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#work::-webkit-scrollbar {
  display: none;
}

.work-items {
  padding: 250px 5% 200px 7%;
  display: flex;
  flex-direction: column;
  gap: 200px;
}

.work-item {
  display: flex;
  align-items: center;
  gap: 64px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.work-item.active {
  opacity: 1;
}

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

.work-item:not(.active):hover {
  opacity: 1;
}

.work-item--reverse {
  justify-content: flex-end;
}

.work-number {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: clamp(120px, 15.6vw, 300px);
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.work-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 450px;
}

.work-details--right {
  text-align: right;
}

.work-company {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}

.work-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 32px;
}

.work-description {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}

/* ==========================================================================
   Experience Section
   ========================================================================== */

.experience-content {
  position: absolute;
  top: 50%;
  left: 22%;
  transform: translateY(-50%);
  width: 550px;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.experience-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.experience-item--last {
  border-bottom: none;
}

.experience-company {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
}

.experience-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.contact-message {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(28px, 2.08vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.contact-email {
  position: relative;
  width: fit-content;
  align-self: flex-start;
}

.contact-email .copy-email-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(28px, 2.08vw, 40px);
  line-height: 48px;
  letter-spacing: -0.03em;
  color: var(--color-text);
  display: block;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.contact-email:hover .copy-email-btn {
  color: var(--color-accent);
}

.copied-annotation {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  white-space: nowrap;
  padding-bottom: 4px;
}

.contact-email-underline {
  position: absolute;
  bottom: -4px;
  left: -2px;
  width: calc(100% + 4px);
  height: 4px;
  background: var(--color-accent);
  transform-origin: left center;
  scale: 0 1;
  transition: scale 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact-email:hover .contact-email-underline {
  scale: 1 1;
}

/* ==========================================================================
   Scroll-driven Entrance Animations
   ========================================================================== */

.about-content,
.work-items,
.experience-content,
.contact-content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-content {
  transform: translate(0, calc(-50% + 40px));
}

.section.in-view .about-content {
  opacity: 1;
  transform: translate(0, -50%);
}

.section.in-view .work-items {
  opacity: 1;
  transform: translateY(0);
}

.experience-content {
  transform: translate(0, calc(-50% + 40px));
}

.section.in-view .experience-content {
  opacity: 1;
  transform: translate(0, -50%);
}

.contact-content {
  transform: translate(-50%, calc(-50% + 40px));
}

.section.in-view .contact-content {
  opacity: 1;
  transform: translate(-50%, -50%);
}


/* ==========================================================================
   Hamburger Menu (hidden on desktop)
   ========================================================================== */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.menu-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 100px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open .menu-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .menu-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Comment Mode
   ========================================================================== */

/* --- Panel --- */

.comment-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  height: 100dvh;
  background: #111111;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  color: #cccccc;
}

@media (prefers-color-scheme: light) {
  .comment-panel {
    background: #e8e8e8;
    border-left-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
  }
}

body.comment-mode-active .comment-panel {
  transform: translateX(0);
}

.comment-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  flex-shrink: 0;
}

.comment-panel-title {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.comment-panel-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.comment-panel-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: light) {
  .comment-panel-close:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

/* --- Filters --- */

.comment-panel-filters {
  display: flex;
  gap: 4px;
  padding: 0 24px 16px;
  flex-shrink: 0;
}

.comment-filter {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-filter {
    border-color: rgba(0, 0, 0, 0.15);
  }
}

.comment-filter:hover {
  opacity: 0.8;
}

.comment-filter.active {
  opacity: 1;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- Comment List --- */

.comment-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

@media (prefers-color-scheme: light) {
  .comment-panel-list {
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
  }
}

.comment-card {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-card {
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }
}

.comment-card.resolved {
  opacity: 0.45;
}

.comment-card-target {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-card-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.comment-card.resolved .comment-card-status {
  background: #666;
}

.comment-card-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.comment-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-card-time {
  font-size: 11px;
  opacity: 0.4;
}

.comment-resolve-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  font-family: var(--font-body);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-resolve-btn {
    border-color: rgba(0, 0, 0, 0.15);
  }
}

.comment-resolve-btn:hover {
  opacity: 1;
  border-color: var(--color-accent);
}

.comment-empty {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.3;
  font-size: 14px;
  line-height: 1.5;
}

/* --- Footer --- */

.comment-panel-footer {
  padding: 16px 24px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (prefers-color-scheme: light) {
  .comment-panel-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
  }
}

.comment-export-btn {
  width: 100%;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-export-btn {
    border-color: rgba(0, 0, 0, 0.15);
  }
}

.comment-export-btn:hover {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.03);
}

@media (prefers-color-scheme: light) {
  .comment-export-btn:hover {
    background: rgba(0, 0, 0, 0.03);
  }
}

/* --- Comment Form Overlay --- */

.comment-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-form-overlay {
    background: rgba(0, 0, 0, 0.3);
  }
}

.comment-form-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.comment-form {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-form {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
  }
}

.comment-form-overlay.visible .comment-form {
  transform: translateY(0);
}

.comment-form-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.comment-form-textarea {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

@media (prefers-color-scheme: light) {
  .comment-form-textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
  }
}

.comment-form-textarea:focus {
  border-color: var(--color-accent);
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.comment-form-cancel,
.comment-form-submit {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.comment-form-cancel {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

@media (prefers-color-scheme: light) {
  .comment-form-cancel {
    border-color: rgba(0, 0, 0, 0.12);
  }
}

.comment-form-cancel:hover {
  opacity: 0.7;
}

.comment-form-submit {
  background: var(--color-accent);
  border: none;
  color: #000;
}

.comment-form-submit:hover {
  opacity: 0.85;
}

/* --- Element Hover Highlight --- */

body.comment-mode-active #main-content *:not(.comment-panel *):not(.comment-form-overlay *):not(.comment-mode-indicator *):not(.comment-pin) {
  cursor: crosshair !important;
}

.comment-highlight-outline {
  position: fixed;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.15s ease, top 0.1s ease, left 0.1s ease, width 0.1s ease, height 0.1s ease;
}

body.comment-mode-active .comment-highlight-outline.visible {
  opacity: 1;
}

/* --- Comment Pins --- */

.comment-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--color-accent);
  color: #000;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  z-index: 998;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
}

body.comment-mode-active .comment-pin {
  opacity: 1;
  pointer-events: auto;
}

.comment-pin:hover {
  transform: rotate(-45deg) scale(1.15);
}

.comment-pin span {
  transform: rotate(45deg);
}

.comment-pin.resolved-pin {
  background: #666;
}

/* --- Mode Indicator --- */

.comment-mode-indicator {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text);
  z-index: 1002;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  .comment-mode-indicator {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
}

body.comment-mode-active .comment-mode-indicator {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.comment-mode-indicator kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
}

@media (prefers-color-scheme: light) {
  .comment-mode-indicator kbd {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
  }
}

/* --- Shrink main content when panel open --- */

body.comment-mode-active {
  max-width: none;
}

body.comment-mode-active .sidebar,
body.comment-mode-active #main-content {
  transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.comment-mode-active #main-content {
  margin-right: 380px;
}

@media (max-width: 1200px) {
  :root {
    --sidebar-width: 280px;
    --sidebar-padding: 40px;
  }

  .nav-text {
    font-size: 40px;
    line-height: 48px;
  }

  .nav-item {
    height: 48px;
  }

  .work-number {
    font-size: 150px;
  }

  .work-items {
    gap: 120px;
  }

  .experience-content {
    left: 10%;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  /* --- Sidebar / Nav --- */

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 32px 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 101;
  }

  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    padding: 60px 24px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  @media (prefers-color-scheme: light) {
    .navigation {
      background: rgba(255, 255, 255, 0.95);
    }
  }

  .navigation.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item {
    height: 48px;
  }

  .nav-text {
    font-size: 40px;
    line-height: 48px;
  }

  /* --- Main Content --- */

  #main-content {
    margin-top: 0;
    width: 100%;
  }

  .section {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Home --- */

  .hero-image {
    width: 367px;
    max-width: 98%;
    height: auto;
    aspect-ratio: 367 / 473;
    top: auto;
    bottom: 164px;
    right: auto;
    left: 50%;
    transform: translateX(calc(-50% + 48px));
  }

  .hero-text {
    left: 24px;
    right: auto;
    bottom: auto;
    top: 512px;
    width: 327px;
    max-width: calc(100% - 48px);
  }

  .hero-text h1 {
    font-size: 64px;
    line-height: 72px;
    letter-spacing: -3.2px;
  }

  .hero-subtitle h2 {
    font-size: 20px;
    line-height: 24px;
  }

  .hero-subtitle p {
    font-size: 14px;
    line-height: 20px;
  }

  .hero-subtitle {
    padding-left: 4px;
  }

  .annotation {
    font-size: 18px;
  }

  /* --- About --- */

  .about-content {
    left: 24px;
    right: 24px;
    max-width: none;
    font-size: 32px;
  }

  .about-content p {
    line-height: 40px;
  }

  /* --- Work --- */

  .work-items {
    padding: 160px 24px;
    width: 100%;
    max-width: none;
    gap: 64px;
  }

  .work-item {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .work-item--reverse {
    flex-direction: column;
    align-items: flex-end;
  }

  .work-item--reverse .work-number {
    order: -1;
  }

  .work-number {
    font-size: 128px;
  }

  .work-details {
    padding-left: 4px;
    max-width: none;
    width: 100%;
  }

  .work-details--right {
    text-align: right;
    padding-left: 0;
    padding-right: 4px;
  }

  .work-company {
    font-size: 14px;
  }

  .work-title {
    font-size: 24px;
    line-height: 32px;
  }

  .work-description {
    font-size: 14px;
    line-height: 24px;
  }

  /* --- Experience --- */

  .experience-content {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    max-width: none;
    margin: 178px 24px 0;
    padding-bottom: 104px;
    transform: none;
  }

  .section.in-view .experience-content {
    transform: none;
  }

  .experience-meta {
    font-size: 14px;
    line-height: 20px;
  }

  /* --- Contact --- */

  .contact-content {
    left: 24px;
    right: 24px;
    width: auto;
    max-width: none;
    transform: translate(0, -50%);
    align-items: flex-start;
  }

  .section.in-view .contact-content {
    transform: translate(0, -50%);
  }

  .contact-content {
    transform: translate(0, calc(-50% + 40px));
  }

  .contact-message {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.96px;
  }

  .contact-email .copy-email-btn {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.96px;
    color: var(--color-accent);
  }


  .contact-email-underline {
    scale: 0 1;
    transition: scale 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .section.in-view .contact-email-underline {
    scale: 1 1;
  }

  /* --- Comment Mode mobile --- */

  .comment-panel {
    width: 100%;
    max-width: 380px;
  }

  body.comment-mode-active #main-content {
    margin-right: 0;
  }
}
