:root {
    /* Identity: Dark Glass Command Center */
    --bg-color: #0F172A;
    /* Deep Navy / Slate 900 */
    --text-color: #F1F5F9;
    /* Off-White / Slate 100 */
    --accent-color: #238636;
    /* Darker Success Green */
    --accent-hover: #2EA043;
    --secondary-text: #94A3B8;
    /* Slate 400 */

    /* Glass Surface */
    --glass-bg: rgba(255, 255, 255, 0.08);
    /* Lighter, clear glass (Matches Header) */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    /* Matches Header */

    /* Dark Mode (Redundant as this is now default, but kept for structure) */
    --bg-color-dark: #0F172A;
    --text-color-dark: #F1F5F9;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 17px;

    /* Spacing */
    --container-width: 1100px;
    /* Slightly wider for dashboard feel */

    /* The gradient definition */
    --gradient-bg: linear-gradient(to bottom right, #0f172a, #003b5c);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    /* How it is applied */
    background: var(--gradient-bg);
    background-attachment: fixed;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

/* Glass Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
    color: var(--text-color);
    /* Off-White / Slate 100 */
}

h1 {
    font-size: 48px;
    line-height: 1.1;
}

h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 60px;
}

h3 {
    font-size: 20px;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    /* Tech Square */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
    /* White text on Green button */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 15px rgba(46, 160, 67, 0.4);
    /* Green Glow */
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Navigation */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    /* Use shared variable */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: center;
    /* Center the logo */
    align-items: center;
    height: 60px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    text-decoration: none;
    z-index: 2;
}

.logo-dot {
    color: var(--accent-hover);
    font-size: 1.5em;
    line-height: 0;
    position: relative;
    top: 0;
    vertical-align: baseline;
    text-shadow: 0 0 10px var(--accent-hover);
}

/* Removed Nav Links and Search Styles */

/* Hero Subtitle Detail */
.hero-subtitle-detail {
    font-size: 0.85em;
    /* Smaller */
    color: var(--secondary-text);
    /* Darker/Greyer */
    opacity: 0.8;
}

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

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    min-width: 160px;
    /* Match dropdown width */
    justify-content: space-between;
    /* If we add an arrow later */
}

.dropdown-menu {
    display: flex;
    /* Always flex for transition */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 8px;
    min-width: 160px;
    width: 100%;
    /* Match button width if button is wider */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    flex-direction: column;
    overflow: visible;
    /* Allow pseudo-element to be outside */

    /* Persistence Logic: Delay hiding by 1s, then slow fade */
    transition: opacity 0.8s ease 1s, visibility 0s linear 1.8s;
}

/* Invisible bridge to fix hover gap */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    visibility: visible;
    opacity: 1;
    /* Show immediately on hover */
    transition-delay: 0s;
}

.dropdown-menu a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    font-size: 14px;
    text-align: left;
    /* Align text to left */
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-menu a:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:hover {
    background: rgba(46, 160, 67, 0.2);
    color: #FFFFFF;
}

/* Hero Section */
.hero-section {
    padding-top: 180px;
    padding-bottom: 20px;
    /* Drastically reduced from 120px */
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.value-prop {
    font-size: 20px;
    color: var(--secondary-text);
    margin-bottom: 40px;
    font-weight: 400;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* About Section */
#about {
    padding-top: 20px;
    /* Reduced from default 100px */
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    /* Increased from 10px */
    max-width: 700px;
    /* Reduced from 900px to center content */
    margin: 0 auto;
    text-align: left;
    flex-wrap: wrap;
    /* Stack on mobile */
}

.about-image {
    display: flex;
    justify-content: flex-end;
    /* Align image to the right */
}

.about-image img {
    width: 120px;
    /* Reduced from 140px */
    height: 120px;
    /* Reduced from 140px */
    border-radius: 50%;
    /* Circle */
    object-fit: cover;
    object-position: top;
    /* Ensure head is visible */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-text {
    flex: 0 1 auto;
    /* Don't grow, just fit content */
    min-width: auto;
    /* Allow shrinking */
}

.quote-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    /* Vertical line */
    padding: 20px 30px;
    border-radius: 4px;
    /* Slight radius, but keep it boxy like screenshot */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: fit-content;
    /* Shrink to text width */
    margin: 0;
    /* Remove auto margin to align left next to image */
}

.quote-widget p {
    margin: 0;
    color: var(--secondary-text);
    /* Lighter color */
    font-size: 20px;
    /* Reduced from 22px */
    /* Smaller font */
    line-height: 1.5;
    font-weight: 400;
    /* Un-bold */
    font-style: italic;
}

.about-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.skills-list {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.skill-tag {
    background: transparent;
    color: #FFFFFF;
    /* White text */
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid var(--accent-color);
    /* Green border */
}

/* Portfolio Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    /* Glassmorphism applied here */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.project-card h3 {
    margin-bottom: 10px;
    color: #FFFFFF;
}

.project-card p {
    color: var(--secondary-text);
    font-size: 14px;
    margin-bottom: 20px;
}

.project-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.blog-img-placeholder {
    height: 160px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* Contact Form */
/* Contact Dropdown Form */
.contact-menu {
    min-width: 300px;
    /* Wider for the form */
    padding: 20px;
    left: 0;
    /* Align left edge with button */
    right: auto;
    transform: none;
    /* Remove centering transform */
}

#contact-form-dropdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#contact-form-dropdown input,
#contact-form-dropdown textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 13px;
}

#contact-form-dropdown input:focus,
#contact-form-dropdown textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

#contact-form-dropdown button {
    width: 100%;
    margin-top: 5px;
}

/* Footer */
footer {
    background-color: transparent;
    /* Fully transparent */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 40px 0;
    font-size: 13px;
    color: var(--secondary-text);
    border-top: none;
    text-align: center;
    /* Center text */
}

.footer-content {
    display: flex;
    justify-content: center;
    /* Center content */
    align-items: center;
}

.cookie-banner a {
    color: var(--accent-color);
}

/* Mobile Refinements */
@media (max-width: 768px) {

    /* 1. Header Layout: Logo (Center) */
    .navbar {
        justify-content: center;
        padding: 0 20px;
    }

    /* Logo Centering */
    .logo {
        position: static;
        /* Default static is fine with flex center */
        transform: none;
        margin: 0;
        font-size: 20px;
    }

    /* 2. Quote Fixes */
    .quote-widget p {
        font-size: 18px;
        /* Reduce from 22px */
        line-height: 1.4;
    }

    .quote-widget {
        padding: 15px 20px;
        max-width: 100%;
    }

    /* 3. Contact Form Fixes - Kept for Hero Dropdown */
    .contact-dropdown .dropdown-menu {
        left: auto;
        right: 0;
        width: 300px;
        max-width: 90vw;
        transform: none;
        position: absolute;
    }

    /* Ensure form elements fit */
    #contact-form-dropdown input,
    #contact-form-dropdown textarea {
        width: 100%;
        box-sizing: border-box;
    }
}