:root {
    --bg-color: #ffffff;
    --text-color: #0f172a;
    --accent-color: #075985;
    --accent-light: #e0f2fe;
    --secondary-color: #64748b;
    --section-padding: 100px 60px;
    --card-bg: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

header {
    padding: 24px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.04em;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

nav a {
    margin-left: 32px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

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

section {
    padding: var(--section-padding);
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
}

/* ---- Error Page ---- */
#error-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 60px;
    padding-left: 60px;
    padding-right: 60px;
    width: 100%;
    max-width: none;
    opacity: 1;
    transform: none;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.error-code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
    user-select: none;
}

#error-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

#error-hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #94a3b8;
    max-width: 520px;
    margin-bottom: 48px;
}

.error-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-ghost {
    display: inline-block;
    padding: 16px 32px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    #error-hero { padding-left: 20px; padding-right: 20px; }
}

#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px; /* Increased padding to clear fixed header */
    padding-bottom: 60px;
    opacity: 1;
    transform: none;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100%;
    max-width: none;
    padding-left: 60px;
    padding-right: 60px;
}

#hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -0.05em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero p {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #94a3b8;
    max-width: 720px;
    margin-bottom: 48px;
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 56px;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    background: white;
    border-color: var(--accent-light);
    box-shadow: 0 12px 40px rgba(7, 89, 133, 0.09);
    transform: translateY(-4px);
}

.card i, .card .icon-wrapper {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.card:hover .icon-wrapper {
    background: var(--accent-color);
    color: white;
    transform: rotate(-5deg) scale(1.1);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 64px -12px rgba(0,0,0,0.13);
    border-color: transparent;
}

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

.project-img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-img {
    width: 100%;
    aspect-ratio: 16/10;
    background: #f1f5f9;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 32px;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

.project-card h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.project-card p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: auto;
    transition: gap 0.2s ease;
}

.project-card:hover .project-read-more {
    gap: 10px;
}

#about {
    background: #f1f5f9;
    max-width: none;
    width: 100%;
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 32px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.0625rem;
    color: #334155;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.profile-card {
    background: white;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 16px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ---- Nav CTA ---- */
.nav-cta {
    margin-left: 16px !important;
    padding: 8px 20px;
    background: var(--accent-color);
    color: white !important;
    border-radius: 6px;
    transition: opacity 0.2s ease !important;
}

.nav-cta:hover {
    color: white !important;
    opacity: 0.85;
}

/* ---- Contact Section ---- */
#contact {
    background: #0f172a;
    max-width: none;
    width: 100%;
}

.contact-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-inner h2 {
    color: white;
    margin-bottom: 20px;
}

.contact-text p {
    color: #94a3b8;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.contact-email svg {
    width: 28px;
    height: 28px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.contact-email:hover {
    color: var(--accent-light);
}

.contact-note {
    color: #475569;
    font-size: 0.875rem;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

footer {
    padding: 48px 20px;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: #94a3b8;
    text-align: center;
}

footer .logo {
    color: white;
    justify-content: center;
    margin-bottom: 32px;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.social-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

@media (max-width: 1024px) {
    header { padding: 20px 30px; }
    :root { --section-padding: 80px 30px; }
    .about-inner { grid-template-columns: 1fr; gap: 48px; }
    .profile-card { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 768px) {
    :root { --section-padding: 64px 20px; }
    .grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    #hero { padding-top: 140px; padding-left: 20px; padding-right: 20px; }
}
