/* Design Tokens - CSS Variables */
:root {
    /* Colors */
    --color-black: rgb(0, 0, 0);
    --color-white: rgb(255, 255, 255);
    --color-gray: rgb(209, 213, 219);
    
    /* Typography */
    --font-family: "Fustat", sans-serif;
    --font-weight-light: 300;
    --font-weight-medium: 500;
    
    /* Font Sizes - Adjusted for better proportions */
    --font-size-title-large: 90px;
    --line-height-title-large: 1.2;
    --font-size-title: 36px;
    --line-height-title: 1.3;
    --font-size-subtitle: 28px;
    --line-height-subtitle: 1.4;
    --font-size-body: 18px;
    --line-height-body: 1.6;
    --font-size-small: 16px;
    --line-height-small: 1.5;
    --font-size-label: 18px;
    --line-height-label: 1.5;
    --font-size-button: 16px;
    --line-height-button: 1.5;
    --font-size-nav: 16px;
    --line-height-nav: 1.5;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 28px;
    --space-xl: 40px;
    --space-2xl: 60px;
    --space-3xl: 80px;
    --space-30: 250px; /* mt-30 equivalent */
    
    /* Borders */
    --border-width: 1px;
    --border-width-thin: 0.75px;
    --border-radius-sm: 23px;
    --border-radius-md: 29px;
    --border-radius-lg: 53px;
    
    /* Shadows - using box-shadow for borders */
    --border-shadow: inset 0 0 0 var(--border-width) var(--color-black);
    --border-shadow-thin: inset 0 0 0 var(--border-width-thin) var(--color-black);
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding-horizontal: 80px;
    --container-padding-vertical: 40px;
    --section-spacing: 80px;
}

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

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-light);
    color: var(--color-black);
    background-color: var(--color-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    z-index: 100;
    padding: var(--space-md) var(--container-padding-horizontal);
    border-bottom: none;
}

.nav__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

/* Nav border that scrolls with content */
.nav-border {
    height: var(--border-width);
    background-color: var(--color-black);
    margin-bottom: 0;
}

.nav__name {
    font-size: var(--font-size-nav);
    line-height: var(--line-height-nav);
    font-weight: var(--font-weight-light);
}

.nav__menu {
    display: flex;
    gap: var(--space-lg);
    flex: 1;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Hamburger Menu Toggle Button */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    position: relative;
}

.nav__toggle-icon {
    width: 100%;
    height: 2px;
    background-color: var(--color-black);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Navigation Right Section */
.nav__right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav__link {
    font-size: var(--font-size-nav);
    line-height: var(--line-height-nav);
    font-weight: var(--font-weight-light);
    color: var(--color-black);
    text-decoration: none;
    transition: opacity 0.2s ease-in-out;
}

.nav__link:hover {
    opacity: 0.7;
}

.nav__link--active {
    font-weight: var(--font-weight-medium);
    opacity: 1;
}

.nav__translate-btn {
    font-size: var(--font-size-nav);
    line-height: var(--line-height-nav);
    font-weight: var(--font-weight-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 var(--space-xs);
    color: var(--color-black);
    transition: opacity 0.2s;
    margin-right: var(--space-sm);
}

.nav__translate-btn:hover {
    opacity: 0.7;
}

.nav__weather {
    font-size: var(--font-size-nav);
    line-height: var(--line-height-nav);
    font-weight: var(--font-weight-light);
}

/* Main Content */
.main {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding-vertical) var(--container-padding-horizontal);
    padding-top: calc(var(--container-padding-vertical) + 60px); /* Add padding for fixed nav */
}

/* Offline Mode Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: var(--space-sm) var(--container-padding-horizontal);
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.offline-indicator__content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    color: #856404;
}

.offline-indicator__icon {
    font-size: 18px;
    flex-shrink: 0;
}

.offline-indicator__text {
    flex: 1;
}

/* Adjust main padding when offline indicator is shown */
body:has(.offline-indicator) .main {
    padding-top: calc(var(--container-padding-vertical) + 100px);
}

/* Fallback for browsers that don't support :has() */
.offline-indicator + .nav-border ~ .main,
.offline-indicator ~ .main {
    padding-top: calc(var(--container-padding-vertical) + 100px);
}

.section {
    margin-top: var(--space-30); /* mt-30 */
    margin-bottom: 0;
    scroll-margin-top: 120px; /* Offset for fixed navigation */
}

.section:first-child {
    margin-top: 0; /* First section has no top margin */
}

.section:last-child {
    margin-bottom: 0;
}

.section__title {
    font-size: var(--font-size-title);
    line-height: var(--line-height-title);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-lg);
}

/* Home Section */
.section--home {
    padding: var(--space-2xl) 0;
}

.home__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
}

.home__title {
    font-size: var(--font-size-title-large);
    line-height: var(--line-height-title-large);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin: 0;
}

.btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: var(--font-family);
}

.btn--date {
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--border-shadow);
}

.btn--date-top {
    margin-bottom: var(--space-xl);
}

.btn--date:hover {
    opacity: 0.8;
}

.btn--date:active {
    transform: scale(0.95);
}

.btn__text {
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    font-weight: var(--font-weight-light);
    color: var(--color-black);
}

.btn--date-large {
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--border-shadow-thin);
}

.btn--date-large:hover {
    opacity: 0.8;
}

.btn--date-large:active {
    transform: scale(0.95);
}

.btn--add {
    background-color: var(--color-gray);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-medium);
    color: var(--color-black);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn--send {
    padding: 16px 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--border-shadow);
    margin-top: var(--space-md);
    align-self: flex-start;
}

.btn--send .btn__text {
    font-size: 18px;
    line-height: var(--line-height-button);
    font-weight: var(--font-weight-medium);
}

.divider {
    width: 100%;
    max-width: 700px;
    height: 0;
    border-top: var(--border-width) solid var(--color-black);
    margin: 0;
}

.home__text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    text-align: center;
    max-width: 600px;
    margin: 0;
    padding: 0 var(--space-md);
}

.photo-gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
    width: 100%;
    padding: 0;
}

.photo-gallery img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: var(--border-width) solid var(--color-black);
    background-color: var(--color-white);
}

.photo-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Keep old class for backward compatibility */
.home__gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding: var(--space-lg) 0;
}

.home__gallery img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: var(--border-width) solid var(--color-black);
    border-radius: 4px;
    margin: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home__gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Routine Section */
.routine__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-2xl);
    padding: 0;
}

.section__title--routine {
    margin-bottom: 0;
}

.btn--date-header {
    margin: 0;
}

.routine__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 72px;
    margin-bottom: var(--space-2xl);
    padding: 0;
    align-items: start;
}


.routine__column {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    align-items: flex-start;
}

.routine__subtitle {
    font-size: var(--font-size-subtitle);
    line-height: var(--line-height-subtitle);
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding: 0;
    text-align: left;
}

.routine__underline {
    width: 100%;
    max-width: 360px;
    height: 0;
    border-top: var(--border-width) solid var(--color-black);
    margin: var(--space-sm) 0 var(--space-md) 0;
    padding: 0;
    flex-shrink: 0;
}

.routine__underline--todo {
    max-width: 100%;
    margin-bottom: 20px;
}

.routine__text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: 0;
    padding: 0;
    text-align: left;
}

.routine__todo {
    margin-bottom: var(--space-2xl);
    padding: 0;
}

.todo__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.todo__list--horizontal {
    flex-direction: row;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.todo__item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.todo__checkbox {
    width: 28.78px;
    height: 28.78px;
    box-shadow: var(--border-shadow-thin);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.todo__checkbox--checked {
    background-color: var(--color-black);
}

.todo__checkbox--checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-white);
    font-size: 18px;
    font-weight: bold;
}

.todo__text {
    font-size: 22px;
    line-height: 1.4;
    font-weight: var(--font-weight-medium);
}

.todo__text--editable {
    position: relative;
    cursor: text;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.todo__text--editable:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.todo__text--editable::after {
    content: '✏️';
    position: absolute;
    right: -20px;
    opacity: 0;
    font-size: 12px;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.todo__text--editable:hover::after {
    opacity: 0.6;
}

.todo__edit-container {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.todo__edit-input {
    flex: 1;
    font-size: 22px;
    line-height: 1.4;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    color: var(--color-black);
    padding: 2px 4px;
    border: 1px solid var(--color-black);
    border-radius: 2px;
    background: var(--color-white);
    min-width: 150px;
}

.todo__edit-input:focus {
    outline: none;
    border-color: var(--color-black);
}

.todo__edit-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn--edit-save,
.btn--edit-cancel {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn--edit-save:hover,
.btn--edit-cancel:hover {
    opacity: 1;
}

.routine__add-todo {
    margin-top: 48px;
    padding: 0;
}

.dynamic-todo-lists {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.routine__todo--dynamic {
    margin-bottom: 0;
}

.todo-list__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-sm);
}

.todo-list__title-container {
    flex: 1;
}

.todo-list__buttons {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.btn--icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: var(--space-xs);
    transition: opacity 0.2s ease;
    opacity: 0.6;
}

.btn--icon:hover {
    opacity: 1;
}

.btn--delete-item {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--color-black);
    padding: 2px 6px;
    margin-left: var(--space-xs);
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
    font-weight: bold;
    border-radius: 2px;
}

.btn--delete-item:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 0, 0, 0.1);
}

.todo__item:hover .btn--delete-item {
    opacity: 0.7;
}

/* Editable Text Styles */
[data-editable] {
    position: relative;
    cursor: text;
    transition: background-color 0.2s ease;
    min-height: 1.2em; /* Ensure minimum height even when empty */
    display: inline-block; /* Ensure it takes up space even when empty */
    min-width: 20px; /* Minimum width for clickability */
}

[data-editable]:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 2px;
}

[data-editable]::after {
    content: '✏️';
    position: absolute;
    right: -20px;
    opacity: 0;
    font-size: 12px;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

[data-editable]:hover::after {
    opacity: 0.5;
}

/* Ensure empty editable elements are still clickable */
[data-editable]:empty::before {
    content: '';
    display: inline-block;
    min-width: 1px;
    min-height: 1.2em;
}

.editable-input {
    width: 100%;
    padding: 2px 4px;
    font-family: var(--font-family);
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid var(--color-black);
    border-radius: 2px;
    resize: none;
}

.editable-input:focus {
    outline: none;
    background: var(--color-white);
}

.add-todo__form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: 0;
}

.add-todo__form--inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.add-todo__input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    font-family: var(--font-family);
    color: var(--color-black);
    border: none;
    box-shadow: var(--border-shadow-thin);
    background: transparent;
    min-width: 0;
}

.add-todo__input::placeholder {
    color: var(--color-black);
}

.add-todo__input:focus {
    outline: none;
}

/* Info Section */

.info__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px; /* gap-10 equivalent (2.5rem) */
    padding: 0;
    align-items: start;
}

.info__item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    align-items: flex-start;
}

.info__subtitle {
    font-size: var(--font-size-subtitle);
    line-height: var(--line-height-subtitle);
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding: 0;
    text-align: left;
}

.info__underline {
    width: 100%;
    height: 0;
    border-top: var(--border-width) solid var(--color-black);
    margin: var(--space-sm) 0 var(--space-md) 0;
    padding: 0;
    flex-shrink: 0;
}

.info__text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: 0;
    padding: 0;
    text-align: left;
}

.info__image-placeholder {
    width: 100%;
    aspect-ratio: 1; /* 1:1 square */
    background-color: #f0f0f0;
    border: var(--border-width) solid var(--color-black);
    margin-top: var(--space-md); /* mt-4 */
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.info__image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-black);
    font-size: 14px;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.info__image-placeholder:hover .upload-overlay,
.work__image-placeholder:hover .upload-overlay,
.notes__image-placeholder:hover .upload-overlay {
    opacity: 1;
}

/* Image Delete Button */
.image-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.95);
    border: var(--border-width) solid var(--color-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
    color: var(--color-black);
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 0;
    margin: 0;
}

.image-delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 0, 0, 0.1);
}

.info__image-placeholder:hover .image-delete-btn,
.work__image-placeholder:hover .image-delete-btn,
.notes__image-placeholder:hover .image-delete-btn {
    opacity: 0.9;
}

/* Work Section */
.work__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2xl);
    padding: 0;
    width: 100%;
}

.work__header-left {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    padding: 0;
    margin: 0;
    align-items: flex-start;
}

.section__title--work {
    margin-bottom: 0;
    padding: 0;
    font-size: var(--font-size-title);
    line-height: var(--line-height-title);
    font-weight: var(--font-weight-medium);
}

.work__intro {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: 0;
    padding: 0;
    text-align: left;
    max-width: 100%;
    margin-top: var(--space-sm);
}

.work__header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    text-align: right;
    flex-shrink: 0;
    margin-left: var(--space-xl);
}

.work__grid-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

.work__grid {
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 0;
    align-items: flex-start;
    width: 100%;
    flex: 1;
}

.work__grid--scrollable {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    scroll-behavior: smooth;
}

.work__grid--scrollable::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.work__item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    align-items: flex-start;
    flex-shrink: 0;
    min-width: 280px;
    max-width: 320px;
}

.work__subtitle {
    font-size: var(--font-size-subtitle);
    line-height: var(--line-height-subtitle);
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding: 0;
    text-align: left;
}

.work__subtitle--right {
    text-align: right;
}

.work__underline {
    width: 100%;
    height: 0;
    border-top: var(--border-width) solid var(--color-black);
    margin: var(--space-sm) 0 var(--space-md) 0;
    padding: 0;
    flex-shrink: 0;
}

.work__underline--left {
    width: 100%;
    max-width: 283px;
    margin: var(--space-sm) 0 0 0;
    align-self: flex-start;
}

.work__underline--right {
    width: 100%;
    max-width: 283px;
    margin: var(--space-sm) 0 0 0;
    align-self: flex-end;
}

.work__text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: var(--space-sm) 0 0 0;
    padding: 0;
    text-align: left;
}

.work__text--right {
    text-align: right;
}

.work__meta {
    margin-top: var(--space-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    width: 100%;
}

.work__meta-item {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: 0;
    padding: 0;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.work__meta-label {
    font-weight: var(--font-weight-medium);
    flex-shrink: 0;
}

.work__meta-value {
    font-weight: var(--font-weight-light);
    flex: 1;
}

.work__image-placeholder {
    width: 100%;
    aspect-ratio: 1; /* 1:1 square */
    background-color: #f5f5f5; /* Light gray background matching design */
    border: var(--border-width) solid var(--color-black);
    margin-top: var(--space-md);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-radius: 0; /* Sharp corners as per design */
}

.work__image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work__item--add {
    min-width: 300px;
    max-width: 350px;
}

.work__add-category-button {
    cursor: pointer;
}

/* Arrow navigation for horizontal scroll */
.work__arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: var(--border-width) solid var(--color-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    z-index: 10;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.work__arrow--left {
    left: -50px;
}

.work__arrow--right {
    right: -50px;
}

.work__arrow:hover {
    background-color: var(--color-white);
}

.work__arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.work__arrow--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Notes Section */
.notes__content {
    display: flex;
    flex-direction: row;
    gap: 48px; /* gap-12 equivalent */
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

.notes__image-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.notes__image-placeholder {
    width: 600px; /* Adjust to match design */
    height: auto;
    aspect-ratio: 1071 / 423; /* Maintain original aspect ratio */
    background-color: #f0f0f0;
    border: var(--border-width) solid var(--color-black);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.notes__image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notes__subtitle {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    text-align: right;
    margin: 0;
    padding: 0;
}

.notes__text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.notes__text {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    margin: 0;
    padding: 0;
    text-align: left;
}

/* Contact Section */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
}

.contact__label {
    font-size: var(--font-size-label);
    line-height: var(--line-height-label);
    font-weight: var(--font-weight-medium);
}

.contact__textarea {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-light);
    font-family: var(--font-family);
    color: var(--color-black);
    border: none;
    box-shadow: var(--border-shadow);
    background: transparent;
    resize: vertical;
    min-height: 280px;
}

.contact__textarea:focus {
    outline: none;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact__text {
    font-size: var(--font-size-title);
    line-height: var(--line-height-title);
    font-weight: var(--font-weight-medium);
}

/* Responsive Design - Tablet (iPad: 768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-padding-horizontal: 5vw;
        --container-padding-vertical: 3vh;
        --section-spacing: 5vh;
        --font-size-title-large: clamp(48px, 8vw, 90px);
        --font-size-title: clamp(28px, 4vw, 36px);
        --font-size-subtitle: clamp(22px, 3vw, 28px);
        --font-size-body: clamp(16px, 2vw, 18px);
        --font-size-small: clamp(14px, 1.8vw, 16px);
    }
    
    .nav {
        padding: var(--space-sm) var(--container-padding-horizontal);
    }
    
    .main {
        padding-top: calc(var(--container-padding-vertical) + 80px);
    }
    
    .routine__content {
        grid-template-columns: repeat(2, 1fr);
        gap: 5vw;
    }
    
    .info__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4vw;
    }
    
    .work__header {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .work__header-right {
        align-items: flex-end;
        text-align: right;
    }
    
    .work__grid {
        display: flex;
        flex-direction: row;
        gap: var(--space-lg);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .work__grid--scrollable::-webkit-scrollbar {
        display: none;
    }
    
    .work__item {
        flex-shrink: 0;
        min-width: 250px;
        max-width: 300px;
    }
    
    .work__arrow {
        position: relative;
        left: var(--space-sm);
        right: var(--space-sm);
        top: 50%;
        transform: translateY(-50%);
    }
    
    .work__arrow--left {
        left: var(--space-sm);
        right: auto;
    }
    
    .work__arrow--right {
        left: auto;
        right: var(--space-sm);
    }
    
    .notes__content {
        gap: 4vw;
    }
    
    .notes__image-placeholder {
        width: 100%;
        max-width: 100%;
    }
    
    .section {
        scroll-margin-top: 100px;
    }
}

/* Responsive Design - Mobile (< 768px) */
@media (max-width: 768px) {
    :root {
        --container-padding-horizontal: 4vw;
        --container-padding-vertical: 4vh;
        --section-spacing: 6vh;
        --space-30: clamp(150px, 20vh, 250px);
        --space-2xl: clamp(40px, 6vh, 60px);
        --space-xl: clamp(24px, 4vh, 40px);
        --space-lg: clamp(20px, 3vh, 28px);
        --font-size-title-large: clamp(42px, 12vw, 90px);
        --font-size-title: clamp(24px, 6vw, 36px);
        --font-size-subtitle: clamp(20px, 5vw, 28px);
        --font-size-body: clamp(16px, 4vw, 18px);
        --font-size-small: clamp(14px, 3.5vw, 16px);
        --font-size-nav: clamp(14px, 3.5vw, 16px);
    }
    
    /* Navigation - Mobile Hamburger Menu */
    .nav {
        padding: var(--space-sm) var(--container-padding-horizontal);
    }
    
    .nav__container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav__toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    
    .nav__menu {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        flex-direction: column;
        gap: var(--space-sm);
        padding: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
        flex: none;
        justify-content: flex-start;
    }
    
    .nav__menu.nav__menu--open {
        max-height: 400px;
        padding: var(--space-md) 0;
        margin-top: var(--space-sm);
    }
    
    .nav__link {
        padding: var(--space-xs) 0;
        width: 100%;
        text-align: left;
        font-size: var(--font-size-nav);
    }
    
    .nav__right {
        order: 3;
        margin-left: auto;
        gap: var(--space-xs);
    }
    
    .nav__translate-btn,
    .nav__weather {
        font-size: clamp(12px, 3vw, 16px);
    }
    
    /* Hamburger Animation */
    .nav__toggle.nav__toggle--open .nav__toggle-icon:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav__toggle.nav__toggle--open .nav__toggle-icon:nth-child(2) {
        opacity: 0;
    }
    
    .nav__toggle.nav__toggle--open .nav__toggle-icon:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .offline-indicator {
        padding: var(--space-xs) var(--container-padding-horizontal);
    }
    
    .offline-indicator__content {
        font-size: clamp(12px, 3vw, 14px);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .offline-indicator__text {
        line-height: 1.4;
    }
    
    .main {
        padding-top: calc(var(--container-padding-vertical) + 100px);
    }
    
    body:has(.offline-indicator) .main,
    .offline-indicator + .nav-border ~ .main,
    .offline-indicator ~ .main {
        padding-top: calc(var(--container-padding-vertical) + 120px);
    }
    
    .section {
        scroll-margin-top: 100px;
        margin-top: var(--space-30);
    }
    
    /* Home Section - Mobile */
    .home__content {
        gap: var(--space-lg);
        padding: var(--space-md) 0;
    }
    
    .home__title {
        font-size: var(--font-size-title-large);
        line-height: 1.2;
    }
    
    .home__text {
        max-width: 100%;
        padding: 0;
    }
    
    .divider {
        width: 100%;
        max-width: 100%;
    }
    
    .photo-gallery {
        gap: 12px;
        margin-top: var(--space-lg);
        margin-bottom: var(--space-lg);
    }
    
    .photo-gallery img {
        width: calc(50% - 6px);
        min-width: 150px;
        max-width: 280px;
        height: auto;
        aspect-ratio: 1;
    }
    
    .home__gallery {
        gap: var(--space-sm);
        margin-top: var(--space-lg);
        padding: var(--space-md) 0;
    }
    
    .home__gallery img {
        width: calc(50% - 20px);
        min-width: 150px;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1;
        margin: 8px;
    }
    
    .btn--date {
        padding: 8px 16px;
        font-size: var(--font-size-small);
    }
    
    /* Routine Section - Mobile */
    .routine__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
    }
    
    .btn--date-header {
        align-self: flex-start;
    }
    
    .routine__content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        margin-bottom: var(--space-lg);
    }
    
    .routine__underline {
        max-width: 100%;
    }
    
    .todo__list--horizontal {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .todo__item {
        white-space: normal;
        word-break: break-word;
    }
    
    .todo__text {
        font-size: clamp(18px, 4.5vw, 22px);
    }
    
    .todo__edit-input {
        font-size: clamp(18px, 4.5vw, 22px);
        min-width: 100px;
    }
    
    .add-todo__form {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .add-todo__form--inline {
        flex-direction: row;
        align-items: stretch;
    }
    
    .add-todo__input {
        padding: var(--space-sm) var(--space-md);
    }
    
    /* Info Section - Mobile */
    .info__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .info__image-placeholder {
        margin-top: var(--space-sm);
    }
    
    /* Work Section - Mobile */
    .work__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
    }
    
    .work__header-right {
        align-self: flex-start;
        align-items: flex-start;
        margin-left: 0;
        margin-top: var(--space-md);
    }
    
    .work__grid-wrapper {
        position: relative;
        padding: 0;
        margin: 0;
    }
    
    .work__grid {
        display: flex;
        flex-direction: row;
        gap: var(--space-lg);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: var(--space-sm);
    }
    
    .work__grid--scrollable::-webkit-scrollbar {
        display: none;
    }
    
    .work__item {
        flex-shrink: 0;
        min-width: 85vw;
        max-width: 85vw;
    }
    
    .work__arrow {
        position: relative;
        left: var(--space-xs);
        right: var(--space-xs);
        top: 50%;
        transform: translateY(-50%);
    }
    
    .work__arrow--left {
        left: var(--space-xs);
        right: auto;
    }
    
    .work__arrow--right {
        left: auto;
        right: var(--space-xs);
    }
    
    
    /* Notes Section - Mobile */
    .notes__content {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .notes__image-section {
        width: 100%;
        order: 2;
    }
    
    .notes__image-placeholder {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 1071 / 423;
    }
    
    .notes__text-section {
        order: 1;
        width: 100%;
    }
    
    .notes__subtitle {
        text-align: left;
        margin-bottom: var(--space-xs);
    }
    
    /* Contact Section - Mobile */
    .contact__form {
        gap: var(--space-sm);
    }
    
    .contact__textarea {
        min-height: 200px;
        padding: var(--space-sm);
        font-size: var(--font-size-body);
    }
    
    .btn--send {
        padding: 12px 24px;
        align-self: stretch;
        width: 100%;
    }
    
    .btn--send .btn__text {
        font-size: var(--font-size-body);
    }
    
    /* Image Delete Button - Mobile */
    .image-delete-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
        top: 4px;
        right: 4px;
    }
    
    /* Work Gallery Controls - Mobile */
    .work__arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Responsive Design - Small Mobile (< 480px) */
@media (max-width: 480px) {
    :root {
        --container-padding-horizontal: 5vw;
        --space-30: clamp(120px, 15vh, 200px);
    }
    
    .home__title {
        font-size: clamp(36px, 10vw, 90px);
    }
    
    .routine__content {
        gap: var(--space-lg);
    }
    
    .work__item {
        min-width: 90vw;
        max-width: 90vw;
    }
    
    .photo-gallery img {
        width: calc(100% - 16px);
        max-width: 280px;
    }
    
    .home__gallery img {
        width: calc(100% - 16px);
        max-width: 300px;
        margin: 8px;
    }
    
    .contact__textarea {
        min-height: 150px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Firebase Status Indicator */
.firebase-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-black);
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-family);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.firebase-status-indicator__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

/* Status Colors */
.firebase-status-indicator__dot--initializing {
    background-color: #ffa500;
    animation: pulse 1.5s ease-in-out infinite;
}

.firebase-status-indicator__dot--initialized {
    background-color: #4a90e2;
}

.firebase-status-indicator__dot--connected {
    background-color: #50c878;
}

.firebase-status-indicator__dot--listening {
    background-color: #50c878;
    animation: pulse 2s ease-in-out infinite;
}

.firebase-status-indicator__dot--permission-error,
.firebase-status-indicator__dot--listener-error,
.firebase-status-indicator__dot--error {
    background-color: #ff4444;
}

.firebase-status-indicator__dot--network-error {
    background-color: #ff8800;
}

.firebase-status-indicator__dot--unknown-error {
    background-color: #888888;
}

.firebase-status-indicator__text {
    color: var(--color-black);
    font-weight: var(--font-weight-light);
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Hide on mobile in production (optional) */
@media (max-width: 768px) {
    .firebase-status-indicator {
        font-size: 11px;
        padding: 6px 10px;
        bottom: 15px;
        right: 15px;
    }
    
    .firebase-status-indicator__dot {
        width: 8px;
        height: 8px;
    }
}

/* Footer notes for routine and info sections */
.routine__footer-note,
.info__footer-note,
.work__footer-note {
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    font-weight: var(--font-weight-light);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
    padding: 0;
    text-align: left;
    color: var(--color-black);
}

/* Print Styles */
@media print {
    .nav,
    .btn,
    .firebase-status-indicator {
        display: none;
    }
}
