/* CSS Custom Properties for Theme Colors */
:root {
    --color-primary: #7a5230;
    --color-secondary: #5c3820;
}
.dark {
    --color-primary: #3b9fd8;
    --color-secondary: #1a5c8a;
}

/* Custom Scrollbar */
.resume-scroll::-webkit-scrollbar,
#hero-carousel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.resume-scroll::-webkit-scrollbar-track,
#hero-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.resume-scroll::-webkit-scrollbar-thumb,
#hero-carousel::-webkit-scrollbar-thumb {
    background-color: rgba(122, 82, 48, 0.4);
    border-radius: 20px;
}

.resume-scroll::-webkit-scrollbar-thumb:hover,
#hero-carousel::-webkit-scrollbar-thumb:hover {
    background-color: rgba(122, 82, 48, 0.7);
}

.dark .resume-scroll::-webkit-scrollbar-thumb,
.dark #hero-carousel::-webkit-scrollbar-thumb {
    background-color: rgba(59, 159, 216, 0.4);
}

.dark .resume-scroll::-webkit-scrollbar-thumb:hover,
.dark #hero-carousel::-webkit-scrollbar-thumb:hover {
    background-color: rgba(59, 159, 216, 0.7);
}

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

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    overflow-y: scroll; /* always reserve scrollbar gutter to prevent layout shift */
}

/* News Ticker */
@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-track {
    animation: ticker 18s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out both; /* 'both' holds opacity:0 during delay */
}

/* ===================================
   Corner Registration Marks
   =================================== */

.corner-mark {
    position: absolute;
    width: 18px;
    height: 18px;
    z-index: 10;
}

.corner-mark::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 18px;
    background: #a07850;
    left: 50%;
    top: 0;
}

.corner-mark::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 18px;
    background: #a07850;
    top: 50%;
    left: 0;
}

.dark .corner-mark::before,
.dark .corner-mark::after {
    background: #3d6a8a;
}

.delay-50  { animation-delay:  50ms; }
.delay-100 { animation-delay: 100ms; }
.delay-150 { animation-delay: 150ms; }
.delay-200 { animation-delay: 200ms; }
.delay-250 { animation-delay: 250ms; }
.delay-300 { animation-delay: 300ms; }
.delay-350 { animation-delay: 350ms; }
.delay-400 { animation-delay: 400ms; }
.delay-450 { animation-delay: 450ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* Horizontal Bounce Animation */
@keyframes bounce-x {
    0%, 100% {
        transform: translateX(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce-x {
    animation: bounce-x 1s infinite;
}

/* ===================================
   Graph Paper Hero Background
   =================================== */

.graph-paper {
    background-color: #f5ead8;
    background-image:
        linear-gradient(rgba(120, 80, 40, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 80, 40, 0.2) 1px, transparent 1px);
    background-size: 32px 32px;
}

.dark .graph-paper {
    background-color: #071628;
    background-image:
        linear-gradient(rgba(59, 159, 216, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 159, 216, 0.12) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ===================================
   Engineering Drawing Card
   =================================== */

.drawing-card {
    border: 1.5px solid #a07850;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.dark .drawing-card {
    border-color: #1e4a70;
}

.drawing-card-header {
    display: flex;
    border-bottom: 1.5px solid #a07850;
    flex-shrink: 0;
}

.dark .drawing-card-header {
    border-color: #1e4a70;
}

.drawing-field {
    padding: 6px 12px;
    border-right: 1px solid #a07850;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dark .drawing-field {
    border-color: #1e4a70;
}

.drawing-field:last-child {
    border-right: none;
}

.drawing-label {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a6040;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.dark .drawing-label {
    color: #3d6a8a;
}

.drawing-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c1810;
    line-height: 1.2;
}

/* ===================================
   Nav Buttons (Landing Page)
   =================================== */

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 1.25rem 1.5rem;
    padding-right: 3rem;
    border: 1.5px solid #a07850;
    border-radius: 8px;
    background: #fdf6ec;
    color: #2c1810;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
}

.nav-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(122, 82, 48, 0.15);
    background: #eeddd0;
}

.nav-button .nav-button-section {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a6040;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.nav-button .nav-button-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c1810;
}

.nav-button .nav-button-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a07850;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-button:hover .nav-button-arrow {
    transform: translateY(-50%) translateX(4px);
    color: var(--color-primary);
}

.dark .nav-button {
    border-color: #1e4a70;
    background: #0d2240;
    color: #c8e0f8;
}

.dark .nav-button:hover {
    background: #112a50;
    box-shadow: 0 8px 24px rgba(59, 159, 216, 0.15);
}

.dark .nav-button .nav-button-section {
    color: #3d6a8a;
}

.dark .nav-button .nav-button-title {
    color: #c8e0f8;
}

.dark .nav-button .nav-button-arrow {
    color: #1e4a70;
}

.dark .nav-button:hover .nav-button-arrow {
    color: #3b9fd8;
}

/* ===================================
   Profile Picture Placeholder
   =================================== */

.profile-pic-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid #a07850;
    background: #eeddd0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dark .profile-pic-placeholder {
    border-color: #1e4a70;
    background: #0d2240;
}

/* ===================================
   Tile Cards (Projects / Ideas Grid)
   =================================== */

.tile-card {
    border: 1.5px solid #a07850;
    border-radius: 8px;
    overflow: hidden;
    background: #fdf6ec;
    text-decoration: none;
    color: #2c1810;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(122, 82, 48, 0.15);
}

.tile-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.tile-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.tile-card-body .tile-label {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 2px;
    background: #fef3c7;
    color: #92400e;
}

.tile-card-body .tile-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c1810;
}

.dark .tile-card {
    border-color: #1e4a70;
    background: #0d2240;
    color: #c8e0f8;
}

.dark .tile-card-body .tile-label {
    background: rgba(120, 53, 15, 0.4);
    color: #fcd34d;
}

.dark .tile-card-body .tile-title {
    color: #c8e0f8;
}

/* ===================================
   Subpage Header (slim, no hamburger)
   =================================== */

.subpage-header {
    position: fixed;
    top: 2rem;
    width: 100%;
    z-index: 40;
    background: rgba(245, 234, 216, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #a07850;
    transition: background 0.3s, border-color 0.3s;
}

.dark .subpage-header {
    background: rgba(7, 22, 40, 0.9);
    border-color: #1e4a70;
}

.subpage-header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}
