/* ---
  Anthropic-Inspired Aesthetic (Warm, Minimal, Typographic)
--- */

:root {
    /* Color Palette */
    --bg-color: #f0eee6; /* New overall background color */
    --text-primary: #191919; /* Charcoal */
    --text-secondary: #5e5e5e; /* Dark Grey */
    --accent-color: #c46243; /* Terracotta/Burnt Orange */
    --accent-hover: #a34e32;
    --border-color: #d0cfc9;
    --card-bg: #ffffff; /* White cards on beige bg */
    
    /* Typography */
    --font-serif: 'Libre Baskerville', serif;
    --font-sans: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* --- Global Reset & Base Styles --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400; /* Regular weight for elegance */
    color: var(--text-primary);
    margin-top: 0;
    line-height: 1.3;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 70ch; /* Optimal reading length */
}

a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* --- Layout --- */
.container {
    max-width: 1400px; /* Widened to fill page */
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header --- */
header {
    padding: 1.5rem 0; /* Slightly tighter */
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Montserrat', sans-serif; /* New font for readability and uniqueness */
    font-size: 2.2rem; /* Increased size */
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: none;
    display: flex;
    align-items: center; /* Revert to center for better overall balance */
    gap: 1rem;
}

.header-profile-img {
    width: 65px; /* Increased visibility */
    height: 65px;
    border-radius: 0; /* Remove circular frame */
    object-fit: cover;
    /* Removed border for cleaner look */
    transition: transform 0.2s;
    position: relative;
    top: 10px; /* Bring it down further to align with text */
}

.nav-logo:hover .header-profile-img {
    transform: scale(1.05); /* Subtle zoom instead of border color */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem; /* Increased gap */
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 1.15rem; /* Bigger */
    font-weight: 600; /* More prominent */
    color: var(--text-primary); /* Darker for readability */
    border-bottom: none;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* --- Hero Section --- */
.hero-section {
    padding: 6rem 0 6rem; /* Reduced from 10rem to move content up */
    min-height: 80vh;
    display: flex;
    align-items: center; 
    position: relative; 
    overflow: hidden; 
}

/* New Grid Layout for Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Text gets more space */
    gap: 6rem; /* Bigger gap */
    align-items: center;
    position: relative;
    z-index: 2; 
    width: 100%;
}

.hero-text {
    max-width: 800px; /* Allow text to be wider */
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px; /* Bigger canvas for bigger animation */
}

.hero-animation {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 140%; 
    height: 140%;
    z-index: -1; 
    pointer-events: none; 
    opacity: 0.6; 
}

#organic-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Hero Animation (Black Hole System) --- */
.black-hole-container {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bh-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15; /* Above background, below/intertwined with black hole */
    pointer-events: none;
}

.black-hole-system {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.1); /* Start very small */
    opacity: 0; /* Start invisible */
    transition: transform 4s cubic-bezier(0.19, 1, 0.22, 1), opacity 3s ease-in; /* Slower, staged emergence */
    transform-style: preserve-3d;
}

.black-hole-system.emerged {
    transform: scale(1);
    opacity: 1;
}

.black-hole-core {
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: #000;
    border-radius: 50%;
    z-index: 20;
    box-shadow: 
        0 0 50px #000,
        0 0 100px rgba(196, 98, 67, 0.6),
        inset 0 0 30px rgba(0,0,0,0.8); /* Stronger shadows, added inset */
    /* No rotation needed for a sphere/circle, but keeps context */
}

.photon-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    z-index: 19;
    filter: blur(2px);
    opacity: 0; /* Start hidden */
    transition: opacity 1.5s ease-in;
}

.photon-ring.active {
    opacity: 1;
}

/* Accretion Disks - Chaotic Rings */
.accretion-disk {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(196, 98, 67, 0.3);
    box-shadow: 0 0 15px rgba(196, 98, 67, 0.1);
    transform-style: preserve-3d;
    opacity: 0; /* Start hidden */
    transition: opacity 1.5s ease-in;
}

.accretion-disk.active {
    opacity: 1;
}

.disk-1 {
    width: 250px;
    height: 250px;
    border-color: rgba(196, 98, 67, 0.7);
    border-width: 2px;
    animation: orbit1 8s linear infinite;
}

.disk-2 {
    width: 350px;
    height: 350px;
    border: 1px dashed rgba(50, 50, 50, 0.5);
    animation: orbit2 12s linear infinite;
}

.disk-3 {
    width: 480px;
    height: 480px;
    border-width: 1px;
    border-color: rgba(196, 98, 67, 0.2);
    animation: orbit3 15s linear infinite reverse;
}

@keyframes orbit1 {
    0% { transform: rotateX(70deg) rotateY(-10deg) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateY(-10deg) rotateZ(360deg); }
}

@keyframes orbit2 {
    0% { transform: rotateX(30deg) rotateY(40deg) rotateZ(0deg); }
    100% { transform: rotateX(30deg) rotateY(40deg) rotateZ(360deg); }
}

@keyframes orbit3 {
    0% { transform: rotateX(80deg) rotateY(10deg) rotateZ(0deg); }
    100% { transform: rotateX(80deg) rotateY(10deg) rotateZ(360deg); }
}

.hero-top {
    height: 9.5rem; /* Tightly sized for 2 lines */
    margin-top: -5.5rem; /* Pulled up even further */
    margin-bottom: 6.5rem; /* Pushed down even more */
    display: flex;
    align-items: flex-start;
}

.hero-top h1 {
    font-size: 4.2rem;
    line-height: 1.1;
    margin: 0;
    display: block;
    min-height: 9.24rem; /* Precise lock for 2 lines */
}

.hero-bio-container {
    background-color: #e3dacc; /* New background bio color */
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    border-radius: 0 8px 8px 0;
    margin-top: 0.5rem; /* Reduced space */
}

.hero-bio {
    font-family: 'Libre Baskerville', serif; /* Editorial/Sophisticated look */
    font-size: 1.3rem; /* Bigger */
    font-weight: 700; /* Bolder */
    color: #000000; /* Pure black */
    line-height: 1.8;
    margin: 0; /* Container handles margin */
}

/* Specific override for paragraphs inside bio to ensure black color */
.hero-bio p {
    color: #000000 !important;
}

.hero-connect {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* --- Skills Section --- */
.skills-section {
    padding: 2rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: #e8e7e1; /* Slightly darker than bg */
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-color);
    color: var(--accent-color);
}

/* --- Projects Section --- */
.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns for wider screens */
    gap: 3rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid var(--border-color); /* Added border back for structure */
    padding: 2rem;
    border-radius: 8px;
    background: var(--card-bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:last-child {
    border-bottom: 1px solid var(--border-color); /* Reset the previous rule */
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.project-image {
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f4f4f4;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h3 {
    margin-top: 0;
    font-family: var(--font-serif);
    font-size: 1.75rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tags span {
    font-family: var(--font-mono, monospace); /* Or sans */
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.project-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--accent-color); /* Assertive link */
    padding-bottom: 0.2rem;
}

.project-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--text-primary);
}


/* --- Experience Section --- */
.experience-list {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
}

.experience-item {
    margin-bottom: 3rem;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -2.35rem; /* Align with border */
    top: 0.4rem;
    width: 0.6rem;
    height: 0.6rem;
    background-color: var(--bg-color);
    border: 1px solid var(--text-primary);
    border-radius: 50%;
}

.experience-item h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.experience-item h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Quote Section --- */
.quote-section {
    text-align: center;
    padding: 6rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.quote-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.quote-author {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Footer --- */
footer {
    margin-top: 6rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    border-bottom: none;
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-text {
        margin: 0 auto;
    }
    
    .hero-visual {
        order: -1; /* Image on top on mobile */
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
    }

    .project-list {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero-section { padding-top: 4rem; }
    
    .project-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* --- Contact Page --- */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 4rem auto 0;
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1.2rem 3rem;
    background-color: var(--text-primary);
    color: var(--bg-color); 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    border: 2px solid var(--text-primary);
    transition: all 0.2s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-color);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    width: 80%;
    height: 90%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    border: 2px solid var(--text-primary);
    background-color: var(--text-primary);
    color: var(--bg-color);
    transition: all 0.2s ease;
}

.modal-download-btn:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.close-modal {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    flex-grow: 1;
    padding: 0;
    overflow: hidden;
}

#pdf-viewer-container {
    height: 100%;
    overflow-y: auto;
    background-color: #525659; /* Classic PDF viewer background */
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

#pdf-viewer {
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

#pdf-viewer canvas {
    max-width: 100%;
    height: auto !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    background-color: white;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 85%;
        margin: 5% auto;
    }
}argin: 5% auto;
    }
}