/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - HSL values matching original React project */
    --background: 0 0% 100%;
    --foreground: 0 0% 10%;
    --card: 0 0% 98%;
    --card-foreground: 0 0% 10%;
    --primary: 215 85% 25%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 96%;
    --secondary-foreground: 0 0% 10%;
    --muted: 0 0% 96%;
    --muted-foreground: 0 0% 45%;
    --accent: 215 85% 55%;
    --accent-foreground: hsl(0, 0%, 100%);
    --border: hsl(0, 0%, 90%);
    --input: hsl(0, 0%, 90%);
    --ring: hsl(215, 85%, 25%);
    --radius: 0.75rem;

    /* Typography */
    --font-primary: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
    --font-secondary: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing - matching original project */
    --section-padding: 4rem 1.5rem;
    --container-padding: 0 1.5rem;
    --container-max-width: 72rem; /* 1152px matching original */

    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    font-feature-settings: "rlig" 1, "calt" 1;
}

body.font-space {
    font-family: var(--font-primary);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--foreground);
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.875rem, 5vw, 2.25rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    color: var(--muted-foreground);
}

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

.link-accent {
    color: var(--accent);
    font-weight: 600;
    transition: var(--transition);
}

.link-accent:hover {
    color: var(--accent);
    text-decoration: underline;
}

.link-primary {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.link-primary:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background-color: transparent;
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.btn-outline:hover {
    background-color: hsl(var(--muted));
    border-color: hsl(var(--accent));
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Icons */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Sections */
section {
    padding: var(--section-padding);
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background-color: var(--background);
}

.hero-content {
    animation: fadeInUp 0.6s ease-out;
    max-width: 100%;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    color: hsl(var(--foreground) / 0.8);
    max-width: 42rem;
    margin-bottom: 2rem;
    line-height: 1.625;
}

/* About Section */
.about-section {
    background-color: hsl(var(--secondary) / 0.6);
}

.about-content {
    max-width: 64rem;
    color: hsl(var(--foreground) / 0.8);
}

.about-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.625;
}

/* Writing Section */
.writing-section {
    background-color: hsl(var(--secondary) / 0.6);
}

.writing-intro {
    font-size: 1.125rem;
    color: hsl(var(--foreground) / 0.8);
    max-width: 80rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.writing-card {
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--card));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.writing-card-content {
    padding: 1.5rem;
}

.writing-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.writing-icon {
    height: 1.5rem;
    width: 1.5rem;
    color: hsl(var(--accent));
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.writing-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.writing-topics {
    list-style: none;
    padding: 0;
    margin: 0;
}

.writing-topics li {
    color: hsl(var(--foreground) / 0.8);
    margin-bottom: 0.5rem;
}

/* Projects Section */
.projects-section {
    background-color: var(--background);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-icon {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-icon svg {
    width: 100%;
    height: 100%;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    font-weight: 700;
}

.project-card p {
    color: var(--muted-foreground);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.projects-footer {
    text-align: left;
    margin-top: 2rem;
}

.projects-footer p {
    font-size: 1.125rem;
    color: hsl(var(--foreground) / 0.8);
}

/* Contact Section */
.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.location .icon {
    color: var(--accent);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 48rem;
}

.contact-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.contact-link:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-link .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.125rem; /* Small offset to align with text baseline */
}

.contact-title {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.contact-desc {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Footer */
.footer {
    background-color: hsl(var(--secondary) / 0.6);
    color: var(--foreground);
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid hsl(var(--border));
}

.footer-content {
    max-width: 48rem;
    margin: 0 auto;
}

.footer-quote {
    font-size: 1.125rem;
    font-style: italic;
    color: hsl(var(--foreground) / 0.8);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-author {
    color: hsl(var(--muted-foreground));
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive Design */
@media (min-width: 768px) {
    :root {
        --section-padding: 6rem 3rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Match original project text sizes */
    h1 {
        font-size: 4.5rem;
        line-height: 1;
    }

    h2 {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .hero-description {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 3rem 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 3rem;
        line-height: 1;
    }

    h2 {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* Special utility classes to match original */
.section-padding {
    padding: 4rem 1.5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 6rem 3rem;
    }
}

.container-custom {
    margin-left: auto;
    margin-right: auto;
    max-width: 72rem; /* 1152px matching original */
}

.text-balance {
    text-wrap: balance;
}

/* Alt-page accent color override (matching original) */
.alt-page {
    --accent: hsl(215, 85%, 55%);
    --accent-foreground: hsl(0, 0%, 100%);
}

/* Animation classes */
.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Font classes */
.font-space {
    font-family: var(--font-primary);
}

.font-inter {
    font-family: var(--font-secondary);
}/* Print Styles */
@media print {
    .hero-buttons,
    .contact-links {
        display: none;
    }

    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-secondary: #000000;
        --text-muted: #333333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Tailwind-like Utility Classes */
.min-h-\[90vh\] {
    min-height: 90vh;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.w-full {
    width: 100%;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-balance {
    text-wrap: balance;
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.text-foreground\/80 {
    color: hsl(var(--foreground) / 0.8);
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground));
}

.max-w-2xl {
    max-width: 42rem;
}

.leading-relaxed {
    line-height: 1.625;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-4 {
    gap: 1rem;
}

.bg-primary {
    background-color: hsl(var(--primary));
}

.hover\:bg-primary\/90:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.ml-2 {
    margin-left: 0.5rem;
}

.h-4 {
    height: 1rem;
}

.w-4 {
    width: 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .md\:text-7xl {
        font-size: 4.5rem;
        line-height: 1;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .md\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}