/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Make images responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: #4a5568;
    line-height: 1.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1.25rem;
    }
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5em;
    display: inline-block;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(106,126,234,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-divider {
    display: flex;
    justify-content: center;
    margin: 1.75rem 0 1.25rem;
    animation: fadeInUp 1s ease-out 0.15s both;
}

.down-arrow {
    width: 32px;
    height: 32px;
    color: rgba(102, 126, 234, 0.8);
    animation: bounce 2s infinite;
}

.divider-line {
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    margin: 0 12px;
    align-self: center;
    border-radius: 2px;
}

.chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #667eea;
    background: rgba(102,126,234,0.06);
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.chev-svg {
    width: 20px;
    height: 20px;
}

.chevron:hover,
.chevron:focus {
    transform: translateY(-4px);
    background: rgba(102,126,234,0.12);
}

.chevron:focus {
    outline: 3px solid rgba(102,126,234,0.18);
    outline-offset: 3px;
}

.chevron.clicked {
    transform: translateY(-2px) scale(0.995);
    box-shadow: 0 8px 20px rgba(102,126,234,0.12) inset;
}

/* subtle pulsing/down motion for the chevron */
.chev-svg {
    animation: chevron-bob 2s infinite;
}

@keyframes chevron-bob {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.85; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .chev-svg {
        animation: none;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-top: 0.25rem;
    margin-bottom: 2rem;
    color: #2d3748;
    font-weight: 500;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description p {
    font-size: 1.2rem;
    color: #4a5568;
}

.hero-focus {
    max-width: 800px;
    margin: 3rem auto 4rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-container {
    position: relative;
    z-index: 3; /* keep hero contents above subtle background/grid */
}

.hero-focus .focus-intro {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.hero-focus .focus-intro h2 {
    color: #2d3748;
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 0;
}

.hero-focus .focus-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.hero-focus .focus-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-focus .focus-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.hero-focus .focus-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
}

.hero-focus .focus-item h3 {
    margin-bottom: 0.8rem;
    color: #2d3748;
    font-size: 1.1rem;
}

.hero-focus .focus-item p {
    color: #4a5568;
    font-size: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

@media (max-width: 480px) {
    .cta-button {
        padding: 0.9rem 1.8rem;
        width: 100%;
        max-width: 280px;
        text-align: center;
        font-size: 1rem;
    }
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* About Section */
.about {
    padding: 6rem 0;
    background: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    color: #2d3748;
}

.focus-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.focus-item {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.focus-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.focus-item h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.focus-item p {
    color: #4a5568;
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (max-width: 480px) {
    .projects {
        padding: 4rem 0;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

@media (max-width: 480px) {
    .project-card {
        padding: 1.75rem;
    }
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-header h3 {
    color: #2d3748;
    flex: 1;
}

.project-number {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 1rem;
}

.project-description {
    margin-bottom: 2rem;
    color: #4a5568;
    line-height: 1.7;
}

.project-link .link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.project-link {
    margin-top: 1.1em;
}

.project-link .link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.project-link .coming-soon {
    color: #a0aec0;
    border-color: #a0aec0;
    cursor: default;
}

.project-link .coming-soon:hover {
    background: transparent;
    color: #a0aec0;
    transform: none;
}

.link-description {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: white;
    text-align: center;
}

.contact-description {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
}

.contact-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Footer */
.footer {
    background: #2d3748;
    color: #a0aec0;
    text-align: center;
    padding: 2rem 0;
}

@media (max-width: 480px) {
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer p {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero {
        padding-top: 6.5rem;
        padding-bottom: 2.5rem;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0.5rem;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        border-radius: 10px;
        min-width: 180px;
        z-index: 2000;
        padding: 0.75rem 0;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
        margin: 0.25rem 0;
        display: flex;
        justify-content: stretch;
    }
    .nav-link {
        display: block;
        width: 100%;
        padding: 1em 1.2em;
        border-radius: 8px;
        font-size: 1.1em;
        color: #4a5568;
        background: none;
        text-align: left;
        transition: background 0.18s, color 0.18s;
    }
    .nav-link:hover, .nav-link:focus {
        background: #f3f6fd;
        color: #667eea;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 2rem;
        color: #667eea;
        cursor: pointer;
        margin-left: 1rem;
        z-index: 2100;
    }
    .nav-container {
        position: relative;
    }
    .container,
    .hero-container {
        max-width: 100%;
        width: 100%;
        padding: 0 1.5rem;
        box-sizing: border-box;
    }
    .projects-grid,
    .focus-areas,
    .hero-focus .focus-areas {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
    }
    .project-card,
    .focus-item {
        width: 100%;
        box-sizing: border-box;
        padding: 1.75rem 1.5rem;
        margin: 0 auto 1.2rem auto;
    }
    .hero-divider {
        margin: 1rem 0;
    }
    .down-arrow, .chev-svg {
        width: 28px;
        height: 28px;
    }
    .divider-line {
        width: 24px;
        margin: 0 6px;
    }
    .hero-focus {
        margin: 1.5rem auto 2.2rem;
        max-width: 100vw;
    }
    .hero-focus .focus-intro {
        margin-bottom: 1.2rem;
        padding: 0 0.25rem;
    }
    .hero-focus .focus-intro h2 {
        font-size: clamp(1.05rem, 4vw, 1.2rem);
    }
    .hero-focus .focus-number {
        font-size: 1.3rem;
    }
    .hero-focus .focus-item h3 {
        font-size: 0.98rem;
    }
    .hero-focus .focus-item p {
        font-size: 0.88rem;
    }
    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-number {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 90vh;
        padding-top: 5rem;
    }
    
    .hero-container {
        padding: 0 1.25rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 5vw, 1.3rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-focus {
        margin: 2rem auto 2.5rem;
    }
    
    .hero-focus .focus-intro {
        margin-bottom: 1.5rem;
        padding: 0 0.25rem;
    }
    
    .hero-focus .focus-intro h2 {
        font-size: clamp(1.1rem, 5vw, 1.3rem);
    }
    
    .hero-focus .focus-areas {
        gap: 1.25rem;
    }
    
    .hero-focus .focus-item {
        padding: 1.5rem;
        margin: 0;
        border-radius: 12px;
    }
    
    .hero-focus .focus-number {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-focus .focus-item h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-focus .focus-item p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .project-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .project-number {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .project-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .project-link .link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .section-title {
        margin-bottom: 2.5rem;
        font-size: 1.8rem;
    }
    
    .contact {
        padding: 4rem 0;
    }
    
    .contact-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before {
        animation: none !important;
    }
}

/* Focus styles for better accessibility */
.nav-link:focus,
.cta-button:focus,
.contact-link:focus,
.link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-title,
    .logo h1,
    .project-number,
    .focus-number {
        -webkit-text-fill-color: currentColor;
        background: none;
        color: #000;
    }
}

@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        border: none;
        min-width: 0;
        padding: 0;
        margin-top: 0;
        gap: 2rem;
    }
    .nav-menu li {
        margin: 0;
        width: auto;
    }
    .nav-link {
        padding: 0.5em 0.8em;
        border-radius: 6px;
        font-size: 1em;
        background: none;
        color: #4a5568;
        text-align: center;
    }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 130vh;
        padding: 5rem 0 2rem;
    }
    
    .hero-focus .focus-areas {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .cta-button {
        margin-top: 1.5rem;
    }
    
    .projects {
        padding: 4rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
}