/* ============================================================
   v2-theme.css - Dariel Page V2 Design System
   Bento Grid + Terminal Aesthetic
   ============================================================ */

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
    /* Backgrounds */
    --bg-void: #0A0D14;
    --surface-card: rgba(18, 24, 36, 0.75);
    --surface-card-solid: #121824;
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* Accents */
    --accent-cyan: #00F5D4;
    --accent-violet: #7928CA;
    --accent-violet-soft: rgba(121, 40, 202, 0.2);
    --accent-violet-border: rgba(121, 40, 202, 0.4);

    /* Text */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-faint: #64748B;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    /* Article fonts (preserved) */
    --font-article-heading: 'Quicksand', sans-serif;
    --font-article-body: 'Belleza', serif;

    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 245, 212, 0.15);
    --glow-violet: 0 0 20px rgba(121, 40, 202, 0.2);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
}

/* ============================================================
   2. Base / Reset
   ============================================================ */
.v2-body {
    background-color: var(--bg-void);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    line-height: 1.6;
}

.v2-body *,
.v2-body *::before,
.v2-body *::after {
    box-sizing: border-box;
}

/* ============================================================
   3. Matrix / Grid Background
   ============================================================ */
.v2-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* Radial Ambient Glows */
.v2-glow-orb {
    position: fixed;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.v2-glow-cyan { top: -100px; left: 10%; background: var(--accent-cyan); }
.v2-glow-violet { bottom: 10%; right: 5%; background: var(--accent-violet); }

/* ============================================================
   4. Navigation Bar
   ============================================================ */
.v2-header {
    position: sticky;
    top: 1.5rem;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.v2-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.6rem 1.25rem;
    background: rgba(18, 24, 36, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    max-width: 1100px;
    width: 100%;
}

.v2-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.v2-brand:hover {
    color: var(--accent-cyan);
    opacity: 1;
}

.v2-brand img {
    height: 32px;
    width: auto;
}

.v2-nav-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.v2-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.v2-nav-links a:hover,
.v2-nav-links a.active {
    color: var(--text-main);
}

.v2-nav-links a:hover::after,
.v2-nav-links a.active::after {
    width: 100%;
}

/* Hamburger (mobile) */
.v2-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-main);
}

/* ============================================================
   5. Container & Layout
   ============================================================ */
.v2-main-content {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.v2-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 3.5rem auto 4rem auto;
    padding: 0 1.5rem;
}

/* ============================================================
    6. Scroll Anchor Offsets
    ============================================================ */
/* Sections need top clearance for sticky header (~80px) */
[id="about"],
[id="academic"],
[id="skills"] {
    scroll-margin-top: 100px;
}

/* ============================================================
    7. Bento Grid
    ============================================================ */
.v2-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

/* ============================================================
   7. Bento Card
   ============================================================ */
.v2-bento-card {
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.v2-bento-card:hover {
    border-color: rgba(0, 245, 212, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

/* ============================================================
   8. Terminal Window
   ============================================================ */
.v2-terminal-card {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.v2-terminal-header {
    background: rgba(10, 13, 20, 0.7);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v2-window-controls {
    display: flex;
    gap: 6px;
}

.v2-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.v2-dot-red { background: #FF5F56; }
.v2-dot-yellow { background: #FFBD2E; }
.v2-dot-green { background: #27C93F; }

.v2-terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.v2-terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ============================================================
   9. Grid Span Configurations
   ============================================================ */
.v2-span-12 { grid-column: span 12; }
.v2-span-7 { grid-column: span 7; }
.v2-span-6 { grid-column: span 6; }
.v2-span-5 { grid-column: span 5; }

/* ============================================================
   10. Hero
   ============================================================ */
.v2-hero-card {
    padding: 2.5rem 2rem;
    text-align: left;
}

.v2-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(0, 245, 212, 0.1);
    color: var(--accent-cyan);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 245, 212, 0.2);
    margin-bottom: 1rem;
}

.v2-hero-badge .v2-pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
    animation: v2-pulse 2s infinite;
}

@keyframes v2-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(0, 245, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0); }
}

.v2-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    border: none;
    padding: 0;
}

.v2-hero-title span {
    background: linear-gradient(135deg, var(--text-main) 60%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.v2-hero-sub {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 650px;
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   11. Profile Card
   ============================================================ */
.v2-profile-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.v2-profile-avatar-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.v2-profile-avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    z-index: 0;
}

.v2-profile-avatar {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    z-index: 1;
    background: #1e293b;
}

.v2-profile-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   12. Terminal Accents
   ============================================================ */
.v2-comment { color: var(--text-faint); }
.v2-keyword { color: var(--accent-cyan); }
.v2-string { color: #FCD34D; }

.v2-line-indicator {
    display: inline-block;
    width: 24px;
    color: #475569;
    user-select: none;
}

/* ============================================================
   13. Tech Pills
   ============================================================ */
.v2-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.v2-tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    cursor: default;
    transition: all 0.2s ease;
}

.v2-tech-pill:hover {
    background: rgba(0, 245, 212, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.v2-tech-pill::before {
    content: ">";
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ============================================================
   14. Card Title
   ============================================================ */
.v2-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    border: none;
    padding: 0;
}

.v2-card-title::before {
    content: '//';
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-weight: 400;
}

.v2-academic-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.v2-highlight-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--accent-violet-soft);
    border: 1px solid var(--accent-violet-border);
    border-radius: 6px;
    color: #E9D5FF;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================================
   15. Featured Projects Card (Tab-style display)
   ============================================================ */
.proj-cards-container {
    position: relative;
}

.proj-card {
    background: rgba(25, 40, 60, 0.95);
    border: 1px solid rgba(0, 245, 212, 0.35);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 0.5rem;
    opacity: 1;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
    z-index: 1;
}

.proj-card.v2-card-hidden {
    opacity: 0;
    pointer-events: none;
}

.proj-card-title {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    text-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
    border: none;
    padding: 0;
}

.proj-card-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.proj-item {
    background: rgba(5, 8, 15, 0.6);
    border: none;
    border-left: 3px solid var(--accent-cyan);
    padding: 0.65rem 0.85rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.proj-item strong {
    color: var(--text-main);
    font-size: 0.88rem;
    display: block;
    margin-bottom: 0.3rem;
}

.proj-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   16. Social Icons & CTA
   ============================================================ */
.v2-bento-card .social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.v2-bento-card .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.v2-bento-card .social-icon:hover {
    background: rgba(0, 245, 212, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.v2-bento-card .cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent-cyan);
    color: var(--bg-void);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 245, 212, 0.3);
    text-decoration: none;
}

.v2-bento-card .cta-button:hover {
    background: var(--accent-violet);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(121, 40, 202, 0.4);
}

.v2-bento-card .cta-button-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 245, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.v2-bento-card .cta-button-small:hover {
    background: var(--accent-cyan);
    color: var(--bg-void);
    transform: translateY(-2px);
}

/* ============================================================
   17. Article Page (Belleza/Quicksand preserved)
   ============================================================ */
.article-page {
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.article-page .blog-content {
    font-family: var(--font-article-body);
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--text-main);
}

.article-page .blog-content h1,
.article-page .blog-content h2,
.article-page .blog-content h3,
.article-page .blog-content h4,
.article-page .blog-content h5,
.article-page .blog-content h6 {
    font-family: var(--font-article-heading);
    color: var(--text-main);
    border: none;
    padding: 0;
}

.article-page .blog-content h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.article-page .blog-content h2 {
    font-size: 2em;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 0.75rem;
}

.article-page .blog-content h3 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-subtle);
    padding-bottom: 0.5rem;
}

.article-page .blog-content p {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.article-page .blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem auto;
    display: block;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

.article-page .blog-content .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    background: var(--bg-void);
    box-shadow: var(--shadow-card);
}

.article-page .blog-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-page .blog-content ul,
.article-page .blog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-main);
}

.article-page .blog-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    position: relative;
    padding-left: 1rem;
}

.article-page .blog-content ul li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: 700;
}

.article-page .blog-content ol li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.article-page .article-author {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Comments */
.article-page .comment-form {
    background: rgba(10, 13, 20, 0.5);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-page .comment-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-family: var(--font-sans);
}

.article-page .comment-form input[type="text"],
.article-page .comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-card-solid);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-family: var(--font-article-body);
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-page .comment-form input[type="text"]:focus,
.article-page .comment-form textarea:focus {
    border-color: var(--accent-cyan);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.2);
}

.article-page .comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.article-page .comment-form .submit-button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-cyan);
    color: var(--bg-void);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-end;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 245, 212, 0.3);
}

.article-page .comment-form .submit-button:hover {
    background: var(--accent-violet);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(121, 40, 202, 0.4);
}

.article-page .comment-form .submit-button:disabled {
    background: var(--text-faint);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   18. Footer
   ============================================================ */
.v2-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    background: rgba(10, 13, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-top: 4rem;
}

.v2-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.v2-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.v2-footer-brand img {
    height: 28px;
    width: auto;
}

.v2-footer-brand .v2-footer-tag {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
}

.v2-footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.v2-footer-links a:hover {
    color: var(--accent-cyan);
}

.v2-footer-copy {
    width: 100%;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.75rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
}

/* ============================================================
   19. Responsive
   ============================================================ */
@media (max-width: 860px) {
    .v2-span-12,
    .v2-span-7,
    .v2-span-6,
    .v2-span-5 {
        grid-column: span 12;
    }

    .v2-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        flex-direction: column;
        background: rgba(18, 24, 36, 0.98);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-top: 0.5rem;
        gap: 0.75rem;
    }

    .v2-nav-links.v2-open {
        display: flex;
    }

    .v2-nav-toggle {
        display: block;
    }

    .v2-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .v2-footer-links {
        justify-content: center;
    }
}
