:root {
    --bg-dark: #0a0f1c;
    --bg-card: #111827;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

@media (prefers-color-scheme: light) {
    /* Optional: Invert for light mode if requested later, but defaulting to dark as requested */
    /* Keeping variables same for now to enforce dark mode as per prompt */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: default;
}

/* Typography & Utilities */
.mono {
    font-family: var(--font-mono);
}

.accent {
    color: var(--accent);
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Spotlight Effect on Background */
.spotlight {
    position: fixed;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--accent-glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transition: background 0.1s ease;
    /* Smooth follow usually handled by JS, but this is a fallback */
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(10, 15, 28, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.premium-logo {
    letter-spacing: 0.1em;
    font-weight: 700;
}

.premium-logo .accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    /* Hidden for now as we force dark */
}

/* Sections */
.section {
    padding: 6rem 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-section .mono {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.hero-section h1 {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.subtitle {
    font-size: clamp(16px, 4vw, 20px);
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 3rem;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.btn.primary:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    font-size: 1.75rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.section-title .mono {
    font-size: 1.25rem;
    margin-right: 10px;
    color: var(--accent);
}

.section-title::after {
    content: "";
    display: block;
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 20px;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 2rem;
}

.tech-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tech-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Metrics Widget */
.metrics-widget {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.metrics-widget:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.1);
    transform: translateY(-4px);
}

.widget-header {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.widget-header-dots {
    display: flex;
    gap: 6px;
}

.widget-header-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    flex: 1;
    text-align: center;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #27c93f;
    white-space: nowrap;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #27c93f;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.metrics-body {
    padding: 1.25rem;
}

.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* 3-column variant — used when 3 tiles sit side by side */
.metric-row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Tighter tile sizing for 3-col rows so text stays on one line */
.metric-row--3 .metric-card {
    padding: 0.65rem 0.6rem;
}

.metric-row--3 .metric-label {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
}

.metric-row--3 .metric-value {
    font-size: 1.15rem;
}

.metric-row--3 .metric-value span {
    font-size: 0.62rem;
}

.metric-row--3 .metric-sub {
    font-size: 0.55rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.875rem;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.5;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.metric-value span {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.metric-sub {
    font-size: 0.6rem;
    color: #27c93f;
    margin-top: 0.3rem;
    font-family: var(--font-mono);
}

.metric-sub.warn {
    color: var(--accent);
}

.sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 28px;
    margin-bottom: 0.875rem;
}

.spark-bar {
    flex: 1;
    background: rgba(56, 189, 248, 0.25);
    border-radius: 2px 2px 0 0;
    transition: height 0.4s ease;
    min-height: 4px;
}

.metrics-footer {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.status-ok {
    color: #27c93f;
}

.uptime {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Window dots (shared between widget header and any card header) */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}


/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
}

.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: var(--timeline-progress, 0%);
    background: var(--accent);
    z-index: 1;
}

.timeline-item {
    padding-left: 2rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
    position: relative;
    transition: border-color var(--transition);
}

.timeline-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.filled::before {
    border-color: var(--accent);
    background: var(--bg-dark);
}

.timeline-item.active::before {
    border-color: var(--accent);
    background: var(--accent);
    animation: activeDotPulse 2s infinite;
}

@keyframes activeDotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

.timeline-item:last-child {
    border-left: none;
    padding-bottom: 0;
}

.timeline-item:last-child::before {
    left: -4px;
}


.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.company {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.skill-card h3 {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}



/* Contact */
.center-text {
    text-align: center;
}

.big-heading {
    font-size: clamp(40px, 5vw, 60px);
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.contact-text {
    max-width: 500px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.socials a:hover {
    color: var(--accent);
}


/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Journal Styles */
/* 1. Main Page Previews */
.journal-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.journal-card {
    display: block;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.journal-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.7);
}

.journal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.journal-card:hover::before {
    transform: scaleX(1);
}

.journal-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color var(--transition);
}

.journal-card:hover h3 {
    color: var(--accent);
}

.journal-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.dot-separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.2);
}

.read-action {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
}

/* 2. Journal Full Page List */
.journal-list {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.journal-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4rem;
    transition: var(--transition);
}

.journal-entry:last-child {
    border-bottom: none;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.entry-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.entry-title a:hover {
    color: var(--accent);
}

.entry-summary {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.read-more {
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
}

.read-more:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-links .active {
    color: var(--accent);
}