:root {
    --primary-color: #1a2b48; /* Deep Navy */
    --secondary-color: #4a5568; /* Slate Gray */
    --accent-teal: #0d9488; /* Professional Teal */
    --nav-gold: #fdfaf3; /* Sophisticated Light Gold */
    --accent-color: #64748b;
    --background-color: #f8fafc; /* Off-White */
    --text-color: #1e293b;
    --light-text: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Page Transition Animation */
main {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.bg-alt {
    background-color: #f1f5f9;
}

.bg-dark {
    background-color: var(--primary-color);
    color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title.light {
    color: var(--white);
    font-family: 'Dancing Script', cursive;
    font-size: 3rem; /* Adjusted for readability */
}

.section-title.light::after {
    background-color: var(--white);
    left: 50%;
    transform: translateX(-50%);
}

.light-p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: rgba(253, 250, 243, 0.1); /* 10% Opacity Light Gold */
    backdrop-filter: blur(12px); /* Glassmorphism effect for readability */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08); /* Subtle blue-tinted shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(13, 148, 136, 0.1); /* Subtle teal border for definition */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, #085472 0%, #0e7ea8 50%, #085472 100%);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    overflow: hidden; 
    opacity: 0.6; /* Added fade back */
    /* Dramatic Shadow */
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.4),
        0 5px 15px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.4);
    /* Floor Reflection */
    -webkit-box-reflect: bottom 2px linear-gradient(transparent, rgba(255, 255, 255, 0.1));
    transition: all 0.3s ease;
}

/* Glossy Reflection/Shine */
.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 40%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}

.logo:hover,
.logo:active {
    transform: translateY(-2px);
    /* Teal selection shadow border */
    box-shadow: 
        0 0 0 2px var(--accent-teal),
        0 15px 30px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.logo a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 1; /* Text above shine */
}

nav a {
    text-decoration: none;
    color: var(--secondary-color);
    margin-left: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
}

nav a:hover,
.navbar nav a.active {
    background-color: rgba(13, 148, 136, 0.05);
    color: var(--accent-teal);
}

/* Hero Section */
.split-section {
    display: flex;
    height: 80vh;
    min-height: 600px;
    align-items: stretch;
}

.image-container {
    flex: 1;
    /* Background moved to .wall-bg */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* filter: brightness(...) applies to all children, including window-view. 
       We use a separate .wall-bg element to control wall brightness independently. */
}

.wall-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Simple Elegant Gradient */
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.05);
    z-index: 0; /* Behind everything */
    filter: brightness(var(--room-light, 0.3)); /* Controlled by JS */
    transition: filter 0.1s linear;
}

/* Window opening outwards */
.window-view {
    position: absolute;
    top: 45%; /* Shifted Up from center */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 420px; /* Reverted height */
    background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 100%); /* Clear Day Sky */
    transition: background 0.8s ease-in-out;
    z-index: 1;
    border-radius: 4px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.2);
}

.window-view.alt-view {
    background: linear-gradient(to bottom, #1e3c72 0%, #2a5298 100%); /* Night Sky */
}

/* Add stars when in night view */
.window-view.alt-view::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px);
    background-size: 80px 80px;
    opacity: 0.3;
}

.window-frame {
    position: absolute;
    top: 45%; /* Shifted Up */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 440px; /* Reverted height */
    border: 12px solid #64748b; /* Grey frame */
    z-index: 20; /* Frame covers cube */
    display: flex;
    justify-content: center;
    perspective: 1200px;
    pointer-events: none; /* Let clicks pass through to cube when blind is up */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    /* overflow: hidden; Removed to show handle */
    background: rgba(255,255,255,0.05); /* Very subtle glass hint */
    filter: brightness(var(--room-light, 0.3)); /* React to blind position */
    transition: filter 0.1s linear;
}

.blind {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Start fully closed */
    background: repeating-linear-gradient(
        to bottom,
        #cbd5e1 0px,
        #cbd5e1 28px,
        #94a3b8 28px,
        #94a3b8 30px
    ); /* Horizontal slats look */
    border-bottom: 5px solid #64748b; /* Bottom weight */
    z-index: 21;
    pointer-events: auto; /* Allow dragging */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: ns-resize; /* Indicate vertical resize */
}

.blind-handle {
    position: absolute;
    bottom: -12px; /* Smaller */
    left: 50%;
    transform: translateX(-50%);
    width: 40px; /* Smaller */
    height: 12px; /* Smaller */
    background: #e2d1a6; /* Gold handle */
    border-radius: 0 0 4px 4px;
    border: 1px solid #c0b08d;
    cursor: grab;
    z-index: 100; /* Priority */
}

.blind:active {
    cursor: grabbing;
}

.blind-handle:active {
    cursor: grabbing;
}

/* Analog Clock (06:15) */
.analog-clock {
    position: absolute;
    top: 30px; /* Moved Up */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fff 90%, #eee 100%);
    border: 6px solid #5d4037;
    border-radius: 50%;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    z-index: 5;
    filter: brightness(var(--room-light, 0.3)); /* React to light */
    transition: filter 0.1s linear;
}

.analog-clock::after { /* 12, 3, 6, 9 ticks */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(to bottom, #333 4px, transparent 4px, transparent 76px, #333 76px),
        linear-gradient(to right, #333 4px, transparent 4px, transparent 76px, #333 76px);
    background-position: center;
    background-size: 4px 100%, 100% 4px;
    background-repeat: no-repeat;
    transform: scale(0.85); /* Padding for ticks */
}

.hand {
    position: absolute;
    bottom: 50%; left: 50%;
    transform-origin: bottom center;
    background: #2c3e50;
    border-radius: 2px;
    z-index: 2;
}

.hand.hour {
    width: 4px; height: 22px;
    transform: translateX(-50%) rotate(187.5deg); /* 06:15 */
}

.hand.minute {
    width: 2px; height: 32px;
    background: #e74c3c; /* Red minute hand */
    transform: translateX(-50%) rotate(90deg); /* 15 mins */
}

.center-dot {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 6px; height: 6px;
    background: #2c3e50;
    border-radius: 50%;
    z-index: 3;
}

/* Warm Bulb / Earth Fixture */
.bulb {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 30;
    
    /* Earth Off State */
    background-color: #2980b9; /* Ocean Blue */
    background-image: 
        radial-gradient(circle at 75% 25%, #2ecc71 0%, #27ae60 12%, transparent 14%), /* Land 1 */
        radial-gradient(circle at 25% 65%, #2ecc71 0%, #27ae60 15%, transparent 18%), /* Land 2 */
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.3) 100%); /* Shadow */
    border: 1px solid #154360;
    box-shadow: inset 0 -3px 8px rgba(0,0,0,0.5), 0 2px 5px rgba(0,0,0,0.3);
    
    transition: all 0.5s ease;
}

/* Cord */
.bulb::after {
    content: '';
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: #2c3e50;
}

/* Bulb On State */
.bulb.on {
    background-color: #fffbf0;
    background-image: none; /* Remove earth pattern */
    border-color: #f1c40f;
    box-shadow: 
        0 0 30px #f1c40f, 
        0 0 80px rgba(241, 196, 15, 0.5),
        0 0 150px rgba(241, 196, 15, 0.3);
}

/* Ambient Light Cast */
.bulb.on::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px; /* Large area */
    height: 1000px;
    background: radial-gradient(circle, rgba(255, 248, 225, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Wooden Table Panel */
.table-panel {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 120px;
    background: repeating-linear-gradient(90deg, #5d4037 0px, #4e342e 20px, #5d4037 40px);
    border-top: 12px solid #3e2723;
    z-index: 25;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    filter: brightness(var(--room-light, 0.3)); /* React to lighting */
    transition: filter 0.1s linear;
    pointer-events: none; /* Let clicks pass through to blind handle */
}

/* Flower Vase */
.flower-vase {
    position: absolute;
    bottom: 120px; /* Sit on table */
    left: 5%; /* Moved further left */
    width: 60px;
    height: 100px;
    z-index: 26;
    filter: brightness(var(--room-light, 0.3)); /* Also darken */
    transition: filter 0.1s linear;
    pointer-events: auto; /* Block clicks */
}

.vase-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.9));
    border-radius: 0 0 20px 20px;
    border-top: 4px solid #2980b9;
    z-index: 2;
}

.stem {
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 3px;
    height: 90px;
    background: #2ecc71;
    transform-origin: bottom center;
    transform: translateX(-50%);
    z-index: 1;
}

.stem.s2 {
    height: 75px;
    transform: translateX(-50%) rotate(20deg);
}

/* White Lily Style */
.flower {
    position: absolute;
    bottom: 90px; /* Top of stem */
    left: 50%;
    transform: translateX(-50%) rotate(-10deg);
    width: 30px;
    height: 25px;
    background: radial-gradient(circle at 50% 100%, #fff 60%, #e6e6e6 100%);
    border-radius: 50% 50% 10px 10px; /* Trumpet shape base */
    clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 20% 100%); /* Flared */
    z-index: 3;
}

/* Lily Center/Stamen hint */
.flower::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #f1c40f; /* Yellow center */
    border-radius: 2px;
}

.flower.f2 {
    bottom: 75px;
    left: 68%; /* Offset right */
    transform: translateX(-50%) rotate(25deg);
    background: radial-gradient(circle at 50% 100%, #fff 60%, #f0f0f0 100%);
}

/* Science Books Stack */
.book-stack {
    position: absolute;
    bottom: 120px; /* Sit on table */
    left: 20%; /* Moved to percentage to clear center */
    width: 100px;
    display: flex;
    flex-direction: column-reverse; /* Stack from bottom */
    align-items: center;
    z-index: 26;
    filter: brightness(var(--room-light, 0.3));
    transition: filter 0.1s linear;
    pointer-events: auto;
}

.book {
    height: 14px;
    border-radius: 2px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    position: relative;
    border-left: 3px solid rgba(255,255,255,0.15); /* Spine highlight */
}

/* Physics - Blue */
.book.b1 {
    width: 110px;
    background: #2c3e50;
    border-bottom: 2px solid #1a252f;
}

/* Chemistry - Red */
.book.b2 {
    width: 105px;
    background: #c0392b;
    border-bottom: 2px solid #96281b;
    transform: rotate(-2deg);
    margin-bottom: -1px;
}

/* Biology - Green */
.book.b3 {
    width: 100px;
    background: #27ae60;
    border-bottom: 2px solid #1e8449;
    transform: translateX(4px);
    margin-bottom: -1px;
}

/* Astronomy - Purple */
.book.b4 {
    width: 95px;
    background: #8e44ad;
    border-bottom: 2px solid #6c3483;
    transform: rotate(3deg);
    margin-bottom: -1px;
}

/* Tech Gear (Laptop & Mobile) */
.tech-gear {
    position: absolute;
    bottom: 120px;
    left: 55%; /* Moved left a bit */
    display: flex;
    align-items: flex-end;
    gap: 15px;
    z-index: 26;
    filter: brightness(var(--room-light, 0.3));
    transition: filter 0.1s linear;
    pointer-events: auto;
}

/* Laptop */
.laptop {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 120px;
}

.screen {
    width: 100px;
    height: 65px;
    background: #2c3e50; /* Bezel */
    border-radius: 4px 4px 0 0;
    padding: 3px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.display-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #8e44ad); /* Wallpaper */
    border-radius: 2px;
    opacity: 0.9;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    position: relative;
}

/* Code lines hint */
.display-content::after {
    content: '';
    position: absolute;
    top: 5px; left: 5px;
    width: 80%; height: 2px;
    background: rgba(255,255,255,0.3);
    box-shadow: 
        0 4px 0 rgba(255,255,255,0.3),
        0 8px 0 rgba(255,255,255,0.3),
        0 12px 0 rgba(255,255,255,0.3);
}

.keyboard-base {
    width: 120px;
    height: 8px;
    background: linear-gradient(to bottom, #bdc3c7, #95a5a6); /* Silver */
    border-radius: 2px 2px 4px 4px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.keyboard-base::before { /* Notch */
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 15px; height: 2px;
    background: #7f8c8d;
    border-radius: 0 0 2px 2px;
}

/* Mobile Phone */
.mobile {
    width: 28px;
    height: 50px;
    background: #34495e; /* Bezel */
    border-radius: 3px;
    padding: 2px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: rotate(5deg); /* Casual placement */
    margin-bottom: 2px;
}

.mobile-screen {
    width: 100%;
    height: 100%;
    background: #2ecc71; /* Screen on */
    border-radius: 1px;
    opacity: 0.8;
    position: relative;
}

/* Notification dot */
.mobile-screen::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

/* Table Lamp */
.table-lamp {
    position: absolute;
    bottom: 120px; /* Sit on table */
    right: 5%; /* Moved further right */
    width: 80px;
    height: 140px;
    z-index: 26;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: brightness(var(--room-light, 0.3));
    transition: filter 0.1s linear;
    cursor: pointer; /* Clickable */
    pointer-events: auto;
}

.table-lamp.on {
    filter: brightness(1.1) !important; /* Slight boost, not intense */
    z-index: 26;
}

.table-lamp.on .lamp-shade {
    background: linear-gradient(to right, #fffbf0, #ffe0b2); /* Warm white */
    box-shadow: 
        0 0 30px #f1c40f, 
        0 0 80px rgba(241, 196, 15, 0.5); /* Matching bulb glow */
}

/* Light Cast for Table Lamp - Upward Dispersion */
.table-lamp.on::after {
    content: '';
    position: absolute;
    top: -150px; /* Shift light source higher */
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 600px;
    /* Focus light upwards: ellipse centered higher */
    background: radial-gradient(ellipse at 50% 70%, rgba(255, 248, 225, 0.4) 0%, rgba(255, 248, 225, 0.1) 40%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Additional Upward Glow */
.table-lamp.on::before {
    content: '';
    position: absolute;
    top: -60px; /* Above shade */
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    background: radial-gradient(ellipse at 50% 100%, rgba(255, 235, 59, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1; /* In front of wall, behind shade */
}

.lamp-base {
    width: 50px;
    height: 15px;
    background: #2c3e50;
    border-radius: 10px 10px 0 0;
    margin-top: auto;
}

.lamp-stand {
    width: 8px;
    height: 70px;
    background: linear-gradient(to right, #bdc3c7, #95a5a6);
}

.lamp-shade {
    width: 90px;
    height: 60px;
    background: linear-gradient(to right, #ecf0f1, #bdc3c7);
    border-radius: 50px 50px 10px 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.wall-panel {
    position: absolute;
    width: 100px;
    height: 125px;
    border: 6px solid #5d4037; /* Dark Wood Frame */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 25; /* Higher than window frame just in case */
    background: #fff;
    padding: 4px; /* Matting */
    filter: brightness(var(--room-light, 0.3)); /* React to blind position */
    transition: filter 0.1s linear;
}

/* Hide the left panel */
.wall-panel.left {
    display: none;
}

/* Move right panel to top right */
.wall-panel.right {
    top: 40px;
    right: 40px;
    left: auto;
    margin: 0;
    transform: none; /* Remove centering transform */
}

/* Canvas for the Art - Natural Sunrise */
.artifact {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Realistic Sunrise Gradient Sky */
    background: linear-gradient(to bottom, #1e3c72 0%, #2a5298 40%, #f6d365 70%, #fda085 100%);
    border: 1px solid #ccc;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

/* Rising Sun */
.artifact::before {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translate(-50%, 0);
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #fff 10%, #ffeb3b 40%, rgba(255, 235, 59, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.9;
}

/* Landscape Silhouette (Mountains) */
.artifact::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: #0f172a; /* Dark silhouette */
    clip-path: polygon(
        0% 100%, 0% 30%, 
        15% 50%, 30% 20%, 
        50% 45%, 70% 15%, 
        85% 35%, 100% 10%, 
        100% 100%
    );
    z-index: 2;
}

/* Remove specific horse adjustments */
.wall-panel.left .artifact::after,
.wall-panel.right .artifact::after {
    transform: none;
    left: 0;
    right: auto;
}

/* Remove the old ::after for wall-panel */
.wall-panel::after {
    display: none;
}

/* Rubik's Cube Graphic */
.cube-container {
    position: absolute;
    top: 45%; /* Shifted Up */
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 1000px;
    width: 200px;
    height: 200px;
    z-index: 10; /* Behind frame/blind */
    /* Always visible now, revealed by blind */
    opacity: 1;
    pointer-events: auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(35deg);
    transition: transform 0.1s ease-out; /* Smooth follow for mouse */
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    background-color: rgba(30, 41, 59, 0.05); /* Very light structure */
    border: 2px solid #e2d1a6; /* Light Gold Edges */
    box-shadow: inset 0 0 15px rgba(226, 209, 166, 0.2);
}

.grid-item {
    border-radius: 2px;
    border: 1px solid rgba(226, 209, 166, 0.1); /* Subtle gold border on items */
}

/* Enhanced Contrast 25% Opacity Colors */
.grid-item.p { background-color: rgba(26, 43, 72, 0.4); } /* Slightly higher base for contrast */
.grid-item.s { background-color: rgba(74, 85, 104, 0.4); }
.grid-item.t { background-color: rgba(13, 148, 136, 0.4); }

.front  { transform: rotateY(  0deg) translateZ(100px); }
.right  { transform: rotateY( 90deg) translateZ(100px); }
.top    { transform: rotateX( 90deg) translateZ(100px); }

/* Decorative back/left/bottom faces */
.back   { transform: rotateY(180deg) translateZ(100px); opacity: 0.3; }
.left   { transform: rotateY(-90deg) translateZ(100px); opacity: 0.3; }
.bottom { transform: rotateX(-90deg) translateZ(100px); opacity: 0.3; }

.content-container {
    flex: 1.2;
    padding: 4rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* High Chrome Panel */
    background: linear-gradient(135deg, #ffffff 0%, #dcdcdc 45%, #f5f5f5 55%, #e0e0e0 100%);
    border: 1px solid #d4d4d4;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 0 20px rgba(255,255,255,0.5);
    border-left: 1px solid #ccc;
    position: relative;
    z-index: 5;
}

.headline {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn.secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.primary:hover {
    background-color: #0f172a;
    transform: translateY(-2px);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Technical Proficiency Pills */
.proficiency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.prof-pill {
    padding: 1.2rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
    min-height: 80px; /* Ensures consistent height for alignment */
}

.prof-pill:hover {
    border-color: var(--accent-teal);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
    transform: translateY(-2px);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    font-size: 1.1rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin-left: 0;
}

.timeline-item {
    padding-bottom: 3rem;
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.time-marker {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
}

.company {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Education Grid */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.edu-card {
    background-color: var(--white);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

.edu-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Contact Section Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding-top: 1rem;
}

.contact-form-container {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.executive-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.form-group label::after {
    content: '*';
    color: #ef4444; /* Professional Red */
    margin-left: 4px;
    font-size: 1.1rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 43, 72, 0.1);
}

.full-width {
    width: 100%;
}

.btn.full-width {
    padding: 1rem;
    cursor: pointer;
    border: none;
}

/* Certifications Page Styles */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-card {
    display: flex;
    background-color: var(--white);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    gap: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    align-items: center;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.cert-card {
    display: flex;
    background-color: var(--white);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--accent-teal); 
    align-items: center;
    gap: 2rem;
}

.cert-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.cert-logo-placeholder {
    width: 80px;
    height: 80px;
    background-color: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cert-logo-placeholder::after {
    content: 'Badge';
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.cert-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-teal);
    display: inline-block;
}

.issuer {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.cert-id {
    font-size: 0.85rem;
    color: var(--light-text);
    font-family: monospace;
}

.cert-date {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
}

/* Experience Page Styles */
.experience-full {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.exp-block {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: start;
}

.exp-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.exp-period {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 0.5rem 1.2rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.exp-company-logo {
    width: 90px;
    height: 90px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
    font-size: 1.5rem;
    border-radius: 8px;
}

.exp-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.exp-company {
    font-weight: 600;
    color: var(--accent-teal);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.exp-summary {
    font-size: 1.15rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 2rem;
    max-width: 650px;
}

.exp-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.exp-highlights li {
    font-size: 1.1rem;
    color: var(--text-color);
    position: relative;
    padding-left: 2rem;
    line-height: 1.5;
}

.exp-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: 700;
}

@media (max-width: 768px) {
    .exp-block {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .exp-sidebar {
        order: 1;
    }
    .exp-main {
        order: 2;
    }
    .exp-highlights {
        text-align: left;
    }
    .exp-summary {
        margin: 0 auto 2rem auto;
    }
}

/* Education Page Styles */
.education-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.edu-item-large {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 3rem;
    align-items: start;
}

.edu-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.edu-year {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
}

.edu-logo-placeholder {
    width: 80px;
    height: 80px;
    background-color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
    font-size: 1.2rem;
    border-radius: 50%;
}

.edu-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.institution {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.edu-description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
}

.additional {
    font-size: 0.9rem;
    color: #607d8b; /* Metallic Blue-Grey text */
    background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%); /* Silver gradient */
    border: 1px solid #cfd8dc;
    padding: 0.4rem 0.8rem;
    border-radius: 8px; /* Rounded rectangle */
    display: inline-block;
    margin-top: 0.8rem;
    margin-right: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 500;
}

@media (max-width: 768px) {
    .edu-item-large {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .edu-meta {
        order: 1;
    }
    .edu-info {
        order: 2;
    }
    .edu-description {
        margin: 0 auto;
    }
}

/* Contact Page Layout Adjustments */
.contact-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .cert-grid {
        grid-template-columns: 1fr;
    }
    .cert-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .cert-badge {
        margin: 0 auto;
    }
}

/* Social Links Adjustment */
.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

.social-icon {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.3s, border-color 0.3s;
}

.social-icon:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 43, 72, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    padding: 3rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-teal);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Statistics Section Styles */
.stat-label {
    font-weight: 700;
    font-style: italic;
    font-size: 1.2rem; /* Increased 20% */
    color: #b0bec5; /* Solid Light Metallic */
    display: inline-block;
    letter-spacing: 0.02em;
}

/* Footer Update */
footer .light {
    font-family: 'Dancing Script', cursive;
}

footer {
    padding: 3rem;
    text-align: center;
    background-color: #f1f5f9;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .split-section {
        flex-direction: column;
        height: auto;
    }
    .image-container {
        height: 400px;
    }
    .content-container {
        padding: 4rem 2rem;
    }
    .headline {
        font-size: 2.5rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-form-container {
        padding: 2rem;
    }
}

/* Sunny Day Popup */
.popup-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100; /* Top priority */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    padding: 1.2rem; /* Reduced */
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #f1c40f;
    min-width: 130px; /* Reduced */
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-content h3 {
    color: #f39c12;
    margin-bottom: 1rem; /* Reduced */
    font-size: 1rem; /* Reduced */
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 8px; height: 8px;
    background-color: #f1c40f;
    animation: fall 1.5s ease-out forwards;
    z-index: 200;
    pointer-events: none;
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100px) rotate(360deg) translateX(20px); opacity: 0; }
}

/* Countdown Overlay */
.countdown-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 6rem; font-weight: 800; color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 150;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.countdown-overlay.active { opacity: 1; }

/* Balloon */
.balloon {
    position: absolute;
    bottom: -60px;
    width: 30px; height: 40px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    z-index: 140;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.1);
}
.balloon::after { /* String */
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    width: 1px; height: 15px; background: rgba(255,255,255,0.8);
}
