/* ===================================
   FiftyPercentCarbon - CSS Styles
   Eco-friendly design system
   =================================== */

/* === CSS Variables === */
:root {
    /* Colors - Light Mode */
    --primary-green: #2ecc71;
    --primary-dark: #27ae60;
    --teal-accent: #1abc9c;
    --teal-dark: #16a085;
    --bg-light: #ffffff;
    --bg-secondary: #f8fffe;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --gradient-primary: linear-gradient(135deg, #2ecc71 0%, #1abc9c 100%);
    --gradient-soft: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-light: #1a1a1a;
    --bg-secondary: #242424;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --gradient-soft: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* === Global Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* === Container === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* === Dark Mode Toggle === */
.dark-mode-toggle {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    transition: all var(--transition-normal);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* === Animated Background === */
.carbon-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: var(--bg-light);
    transition: background-color var(--transition-normal);
}

.carbon-atom {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-green) 0%, var(--teal-accent) 100%);
    opacity: 0.3;
    will-change: transform;
}

[data-theme="dark"] .carbon-atom {
    opacity: 0.5;
    box-shadow: 0 0 10px var(--primary-green);
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    padding: var(--spacing-md) 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(26, 26, 26, 0.85);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    transition: transform var(--transition-normal);
}

.nav-logo:hover .logo-img {
    transform: rotate(20deg) scale(1.1);
}

[data-theme="dark"] .logo-img {
    filter: drop-shadow(0 0 8px var(--primary-green));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--primary-green);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-cta::after {
    display: none;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--spacing-xxl);
    padding: calc(var(--spacing-xxl) + 80px) var(--spacing-lg) var(--spacing-xxl);
    position: relative;
    overflow: hidden;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient-soft);
    opacity: 0.5;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(46, 204, 113, 0.1);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease 0.1s forwards;
    opacity: 0;
}

.badge-icon {
    font-size: 1.25rem;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-green);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.hero-title-main {
    font-size: clamp(3rem, 7vw, 5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    opacity: 0;
    animation: revealLine 1s ease 0.2s forwards;
}

.hero-title-sub {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    color: var(--text-primary);
    font-weight: 600;
    opacity: 0;
    animation: revealLine 1s ease 0.4s forwards;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-hero svg {
    transition: transform var(--transition-fast);
}

.btn-hero:hover svg {
    transform: translateX(4px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: fadeInUp 1s ease 1.2s forwards, bounce 2s ease-in-out 2s infinite;
    opacity: 0;
}

.hero-scroll-indicator svg {
    stroke: var(--text-secondary);
    stroke-width: 2;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
}

.hero-logo-large {
    width: 300px;
    height: 300px;
    position: relative;
    z-index: 2;
    animation: floatLogo 3s ease-in-out infinite;
}

[data-theme="dark"] .hero-logo-large {
    filter: drop-shadow(0 0 30px var(--primary-green));
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-green);
    opacity: 0.15;
    animation: pulse 4s ease-in-out infinite;
}

.hero-circle-1 {
    width: 350px;
    height: 350px;
    animation-delay: 0s;
}

.hero-circle-2 {
    width: 450px;
    height: 450px;
    animation-delay: 1s;
}

.hero-circle-3 {
    width: 550px;
    height: 550px;
    animation-delay: 2s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.15;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.25;
    }
}

@keyframes revealLine {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* === Section Styles === */
.section {
    padding: var(--spacing-xxl) var(--spacing-md);
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* === Carbon Story Section === */
.carbon-story {
    background: var(--gradient-soft);
}

.carbon-visualization-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.carbon-visualization {
    width: 100%;
    height: auto;
    min-height: 400px;
}

.carbon-fact {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    z-index: 10;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.carbon-fact.hidden {
    display: none;
}

.fact-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-green);
}

.fact-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.fact-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.fact-close:hover {
    color: var(--text-primary);
}

/* === Projects Section === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.project-card {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-green);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.eco-impact {
    margin-top: var(--spacing-md);
}

.impact-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.impact-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.impact-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 1s ease;
}

.impact-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-green);
}

/* === Showcase Section === */
.showcase {
    background: var(--bg-secondary);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.showcase-item {
    position: relative;
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--gradient-soft);
    transition: transform var(--transition-normal);
}

.showcase-item:hover {
    transform: scale(1.05);
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: var(--spacing-md);
    color: white;
}

.showcase-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.showcase-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.showcase-item.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: revealItem 0.6s ease forwards;
}

.showcase-item.reveal:nth-child(1) {
    animation-delay: 0.1s;
}

.showcase-item.reveal:nth-child(2) {
    animation-delay: 0.2s;
}

.showcase-item.reveal:nth-child(3) {
    animation-delay: 0.3s;
}

.showcase-item.reveal:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes revealItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Contact Section === */
.contact {
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: start;
}

.contact-info {
    position: sticky;
    top: 100px;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.contact-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-detail-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: start;
}

.detail-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.detail-content h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.detail-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-form-wrapper {
    background: var(--bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-light);
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.btn-submit {
    margin-top: var(--spacing-sm);
    position: relative;
}

.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline;
}

.form-status {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    margin-top: var(--spacing-sm);
}

.form-status.success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--primary-green);
}

.form-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* === Carbon Story Timeline === */
.carbon-story-intro {
    max-width: 800px;
    margin: 0 auto var(--spacing-xxl);
    text-align: center;
}

.story-lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.carbon-timeline {
    max-width: 900px;
    margin: 0 auto var(--spacing-xxl);
    position: relative;
}

.carbon-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-green), var(--teal-accent));
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.timeline-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

.timeline-icon {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-green);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.viz-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-green);
}

.viz-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
}

.section-header {
    margin-bottom: var(--spacing-xl);
}



/* === Footer === */
.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-green);
}

.separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* === Lightbox === */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    animation: fadeIn 0.3s ease;
}

.lightbox.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-content {
    max-width: 1000px;
    width: 100%;
}

#lightboxImage {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.lightbox-caption {
    color: white;
    text-align: center;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.lightbox-caption p {
    font-size: 1rem;
    opacity: 0.8;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-visual {
        order: -1;
        height: 400px;
    }

    .hero-logo-large {
        width: 250px;
        height: 250px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .contact-info {
        position: static;
    }

    .contact-info .section-title {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: var(--spacing-sm);
        font-size: 0.875rem;
    }

    .nav-cta {
        padding: 0.5rem 1rem;
    }

    .hero {
        padding: calc(var(--spacing-xl) + 80px) var(--spacing-md) var(--spacing-md);
    }

    .hero-visual {
        height: 300px;
    }

    .hero-logo-large {
        width: 200px;
        height: 200px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .stat-item {
        text-align: center;
        flex: 1;
        min-width: 120px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .carbon-timeline::before {
        left: 30px;
    }

    .timeline-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .timeline-content {
        padding: var(--spacing-md);
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .nav-menu {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .dark-mode-toggle {
        width: 40px;
        height: 40px;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .stat-item {
        width: 100%;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .timeline-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .carbon-timeline::before {
        display: none;
    }

    .contact-details {
        gap: var(--spacing-md);
    }

    .contact-detail-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}



/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .carbon-atom {
        animation: none !important;
    }
}

/* === Utility Classes === */
.hidden {
    display: none !important;
}