/* CSS Variables */
:root {
    --primary-color: #0f172a;
    /* Slate 900 */
    --secondary-color: #3b82f6;
    /* Blue 500 */
    --accent-color: #06b6d4;
    /* Cyan 500 */
    --text-color: #334155;
    /* Slate 700 */
    --light-text: #94a3b8;
    /* Slate 400 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --bg-alt: #f1f5f9;
    --border-color: #e2e8f0;
    --navbar-bg: rgba(248, 250, 252, 0.9);
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.95);

    --font-primary: 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --primary-color: #f1f5f9;
    --secondary-color: #60a5fa;
    --text-color: #e2e8f0;
    --light-text: #94a3b8;
    --bg-color: #0f172a;
    --bg-alt: #0f172a;
    --card-bg: #1e293b;
    --border-color: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.9);
    --navbar-scrolled-bg: rgba(15, 23, 42, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}

.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-left: 1rem;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--secondary-color);
}

body.dark-mode .theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    color: var(--primary-color);
    line-height: 1.2;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 1rem;
}

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

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: var(--transition);
}

body.dark-mode .navbar {
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: var(--navbar-scrolled-bg);
    box-shadow: var(--shadow);
}

body.dark-mode .navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo .dot {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

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

.nav-links .btn-primary {
    padding: 0.6rem 1.4rem;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    max-width: 650px;
}

.hero-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-image-container {
    position: relative;
    z-index: 10;
}

.hero-headshot {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    object-position: 65% center;
}

.hero-headshot:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.social-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    background: white;
    color: var(--primary-color);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

body.dark-mode .social-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.social-btn:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.social-btn i {
    width: 25px;
    font-size: 1.2rem;
}

.hero h1 {
    font-size: 4.5rem;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.txt-rotate-wrap {
    display: inline-block;
    position: relative;
    height: 1.2em;
    overflow: hidden;
    vertical-align: bottom;
}

.txt-rotate {
    display: block;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
}

.slide-up-in {
    animation-name: slideUpIn;
}

.slide-up-out {
    animation-name: slideUpOut;
}

@keyframes slideUpIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes slideUpOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.hero p {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-bg-accent {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: var(--bg-color);
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    /* Add image later if in plan? Plan said short bio. */
    gap: 4rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.skill-item {
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
}

body.dark-mode .skill-item {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.skill-item i {
    color: var(--secondary-color);
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    background: var(--bg-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 220px;
    overflow: hidden;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background: #ddd;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--light-text);
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

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

.tags span {
    font-size: 0.75rem;
    background: #eff6ff;
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-links a {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-links a:hover {
    color: var(--secondary-color);
}

/* Resume Section */
.resume-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: white;
    text-align: center;
}

body.dark-mode .resume-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.resume-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.resume-content p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    padding: 60px 0 30px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-left h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.footer-left p {
    color: var(--light-text);
}

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

.social-links a {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
    color: var(--light-text);
    font-size: 0.85rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

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

    .hero-socials {
        width: 100%;
        max-width: 400px;
        gap: 1.5rem;
    }

    .hero-headshot {
        width: 200px;
        height: 200px;
    }

    .social-buttons-grid {
        grid-template-columns: 1fr 1fr;
        /* Keep 2x2 even on mobile if space permits, or 1fr for stack? 2x2 is usually fine for buttons */
    }

    .hero-bg-accent {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
        /* Mobile menu implementation usually requires JS toggle, simplistic for now */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
    }

    body.dark-mode .nav-links {
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}